Questions tagged as 'python'

1
answer

Select with pyodbc

I'm trying to use the string I get from an Entry and an OptionMenu to perform the search on SqlServer but gives the following error: TypeError: not enough arguments for format string Here is the function code that executes the call: def c...
asked by 18.04.2018 / 21:38
1
answer

Assigning lists in an array

I am creating in a sequence of files with glob: list (glob.glo ('files')) Arrays with certain values taken from each cell of a file read as a table os.chdir ('C: \ * 2018-01-17') for file in list (glob.glob ('2018011722 * .ascii')): r...
asked by 19.04.2018 / 00:45
0
answers

Python - about asyncio

I started testing pynput with asyncio, but there is a problem that I can not solve at all. My code: current = set() def on_press(key): if key == keyboard.Key.up: current.add(key) print('Y') if key == keyboard.Key.down...
asked by 20.04.2018 / 08:18
1
answer

Error in WEB API with flask

I started my WEB API study trying to create a Pokedex API, when I tried to create the pokemon search function by the number the following error appeared: "json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)" appPokedex:...
asked by 12.04.2018 / 19:38
2
answers

Crud with Python

What would be the problem with these codes? Could someone guide me the best practice for making a registration, editing, deletion and query system? First code: class Cadastro: def __init__(self): self.nome = input('Digite nome do...
asked by 21.04.2018 / 18:03
1
answer

How to simulate a click on Linkedin with selenium. Problem: dynamic id / uses ember

Good morning, I'm trying to click on the 'Show more' button in the skills field but without any success. The xpath is dynamic, and by class also does not work. The button seems to be hidden somehow. I tried xpath: driver.find_element_by_xpa...
asked by 21.04.2018 / 15:19
1
answer

How to define the tangent function in python?

I would like someone to help me define the tangent function using python with constraints on points where the function does not exist (pi / 2 + k * pi (k integer).     
asked by 15.04.2018 / 16:08
0
answers

How to create dataframe in pandas from series with dictionaries?

In Python3 and pandas I have a series with lists. In each line of the series there is a list, with dictionaries inside. It was obtained from a file: import pandas as pd geral = pd.read_csv("mandados_12_abr_2018_RJ.csv",sep=';',encoding = 'lat...
asked by 13.04.2018 / 14:53
0
answers

commands by text list

I'm doing an artificial intelligence project I'm trying to get my boat to run command from a list in .txt but I'm running into next    errorFile "C: /Users/leandro/PycharmProjects/Iana/main.py", line 22, in   load_cmds       indexError...
asked by 17.04.2018 / 20:53
2
answers

How to open a screen with pre-filled form with HTML?

I would like to know how to open a form whose fields are already filled in with user data (resulting from a search in the database), and it is up to the user to only edit the information. I am using Django to program, I was able to do...
asked by 11.04.2018 / 19:00