Questions tagged as 'python-3.x'

2
answers

sql syntax error in mysql database with python 3

In my mysql project with python, when trying to modify a field of the table, the sequence sql generates error and I do not understand why. I accept the name change but when I enter the new price the error arises. The Cod element is the pr...
asked by 05.07.2017 / 19:48
1
answer

Pass the value of a variable from one function to another function in Python

I am starting my studies in Python and I need to make this code for my class. Basically it consists in the registration of the workers of a company to calculate their salary / salary, applying some discounts and bonuses / incentives. In op...
asked by 08.07.2017 / 07:24
1
answer

WebDriverException: Message: 'phantomjs' executable needs to be in PATH

I'm trying to run a program that uses the selenium library and it throws me the following error: Traceback (most recent call last): File "C:\Python34\prueba_nuevo_bot.py", line 2, in <module> bot=FacebookBot() File "C:\Python34\F...
asked by 29.06.2017 / 14:45
1
answer

Run snippet of code at a specific time / date in a running script

In my program ( Python 3.5 ) I want to execute a function at a certain time regardless of which phase of the code it is. But I do not know any sentence that verifies all the time (even in the course of the program) what time it is and if i...
asked by 08.12.2016 / 18:00
0
answers

Add interfaces ui to main window (python)

class MenuA(QMainWindow): def __init__(self): QMainWindow.__init__(self) uic.loadUi("Interfaces/MenuAdmi.ui",self) self.actionAgregar.triggered.connect(self.AgregarInvent) def AgregarInvent(self): AgregarI...
asked by 15.06.2017 / 02:40
0
answers

error 1136 with new columns in mysql table

I am working with tables in mysql, it was working well for me, but I created 2 new columns and when I run it, I get an error.? This is part of my code that I execute, I made new records when I had 5 columns and well, but add 2 new columns to...
asked by 15.07.2017 / 20:41
1
answer

Why does combobox only select the default value, and ignore the selected item?

from tkinter import * from tkinter import ttk ven=Tk() ven.geometry("1600x900+1+0") ven.title("ENVOLVENTE OPERATIVA DE COMPLETAMIENTO") top=Frame(ven,width=1600,height=50,relief="raise",bg="powder blue",bd=10) top.pack(side=TOP) F1=Frame(ven...
asked by 01.06.2017 / 22:56
1
answer

About the pyjstat library for json

I'm trying to read a json with pyjstat but it gives me an error:    KeyError: 'dimension' This is the code: from pyjstat import pyjstat EXAMPLE_URL ='http://www.cso.ie/StatbankServices/StatbankServices.svc/jsonservice/responseinstance/...
asked by 11.04.2017 / 18:40
0
answers

Massive insertions in MongoDB with Python

I'm using python + MongoDB with pymongo So far everything is fine but now I would like to optimize the insert, what I do is read a csv with 50000 rows and create a loop to read row by row, going to json and insert (insert), it takes a long ti...
asked by 16.04.2017 / 23:24
1
answer

Join two dictionaries from text files in which each row is the representation of a dictionary

I have two text files each with about 10 lines of content in dictionary format each:    {'ID': '30', 'Name': 'ECONOMY I', 'Code': 'COFI-214'}   {'ID': '30', 'Name': 'ECONOMY II', 'Code': 'COFI-215'}   ... I want to create a new file tha...
asked by 24.04.2017 / 22:09