Questions tagged as 'python'

1
answer

ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c: 748)

I'm using geopy in an application Python 3.6 and I have to run it on an outdated machine that uses Windows 2012 Server . The problem arises when the application calls this library ( geopy ) on this server, since it returns the fol...
asked by 04.10.2017 / 10:14
1
answer

Help to get summation list of lists generated iteratively

I have developed a program with which I generate a list in each round of a total of 5 rounds. I add these lists to a list of lists called my_list_tot. The code is as follows: import random mi_lista_tot=[] for round in range(5): mi_lista=...
asked by 02.10.2017 / 22:35
1
answer

Repeatedly modify url based on a list and visit it

I have a code that I use to modify certain values of a URL. I explain the process, after login, I call another url in which I make changes. The problem is that I need to enter many URLs similar to these to do the same operation, the difference b...
asked by 03.10.2017 / 01:35
1
answer

Error invalid literal for int () with base 10

Hello friends, I'm creating a program in Python and it gives me that error. Here is my code to know if you can help me, thank you very much def calculoMediana(list): mediana = float(0) tamaño = len(list) if tamaño %2 ==0: mediana = (...
asked by 03.10.2017 / 03:58
2
answers

Unify 2 functions to read files with python

Since some time ago I am trying to make a bash simulator using python, I am creating the tail and head commands, for this create 2 functions: def head(textfile): content = [] try: file = open(textfile, "r") for line in...
asked by 28.05.2018 / 21:09
2
answers

Stop Python script on NAO robot when touching the head

My problem is as follows. I have a Python script that runs so that the NAO robot performs various non-stop actions until the execution stops, however for security reasons (in case the robot goes crazy and wants to kill us all ) I need to add so...
asked by 31.08.2017 / 22:03
1
answer

I need you to give me 2 different letters

I'm trying to make a poker game to play. The problem is that at the time of telling him that he is giving me two cards from the deck, he gives me only one card twice. For example, you give me Q of heart and Q of heart or...
asked by 29.09.2017 / 06:14
1
answer

NOT NULL constraint failed: django

I'm getting an error when I try to create a new element by a form, trying that the user who is already with the session started can upload an image and it is recognized as his in the relationship with the base of data that I have in models.py...
asked by 29.08.2017 / 06:18
1
answer

The database does not want to connect to the host

I'm trying to connect to my MySQL database, I do not want to recognize the localhost, it bounces in error: from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker eng = create_engine("mysql+mysqldb:///host='localhost...
asked by 13.08.2017 / 22:13
1
answer

How to save an image of any format in Python?

I have been investigating the way to save an image in python but so far I have not found anything that can be useful, what I need is to know that import have and how to save the image in python, this image will keep it in a database in mo...
asked by 07.08.2017 / 19:17