Questions tagged as 'python'

0
answers

Encode-python error 3.6

Traceback (most recent call last): File "uns.py", line 64, in <module>expiration_date="2017-08-27", File "uns.py", line 53, in create_user print(response.text) File "F:\Python\Python36\lib\encodings\cp1252.py", line 19, in encode...
asked by 23.02.2017 / 13:14
0
answers

OperationalError: no such table: can anyone help me?

I am trying to read a sqlite file in Jupyter Notebook, however this error appears: OperationalError: no such table: Can someone help me? import sqlite3 conn = sqlite3.connect('escola.sqlite') c = conn.cursor() def leitura_todos_dados():...
asked by 23.02.2017 / 03:10
1
answer

Python / MySQL- How to get the id of a table comparing two different

I have the following two tables as you can see in the following image: I would like for example comparing username (at the session level of each user) of each one to remove their id. I have used the following query but it...
asked by 02.02.2017 / 22:54
1
answer

I'm having problems with python when using import

I'm trying to use import utils, but I've recently discovered that I did not have this file in the python library, so I tried it anyway, it still gives an error, more specifically it does not appear to be 'import'. . How do I resolve this?     
asked by 20.02.2017 / 22:02
2
answers

How to get all ips associated with some domain with Python?

I need to create an application that gets all the ips associated with some domain. I tried using the following code in Python: import socket print(socket.gethostbyname('facebook.com.br')) However, it only returns me an IP. Is there a way t...
asked by 15.02.2017 / 02:25
1
answer

Exception in .py file

I have the following code: import socket from xml.etree import ElementTree as et import math, urllib import random, time, re global String_1, String_2, String_3, String_4, Chat, Using_Proxies, Raid_Fixed_j2 def Raid(): try: nx...
asked by 11.02.2017 / 02:41
2
answers

Rename application in Django Admin

Good night guys, I'm trying to rename the application in django admin according to the documentation, but it did not work, I think I'm doing something wrong, the code is as follows: players control / apps.py from django.apps import AppCon...
asked by 10.02.2017 / 22:28
1
answer

Jupyter notebook and Pyspark

The problem is this: When I enter Jupyer notebok with the command $ pyspark I create a new notebook and type: print(sc) it returns me the following error: NameError Traceback (most recent call last) <ipython-input-1-01cf0a34ba...
asked by 09.01.2017 / 20:28
0
answers

Is there a way to connect to a socket server hosted as localhost by CMD?

I would like to know if there is any way to run my server in python socket and connect to it using the command prompt. Is there any way to do this?     
asked by 03.01.2017 / 16:08
1
answer

Python Error: 'int' object has no attribute '__getitem__'

I'm writing a genetic algorithm in Python to find the least of some mathematical functions. The problem is that when I calculate the fitness of a function and save the result in the fitness list, it presents the following error: Traceback (mos...
asked by 04.01.2017 / 02:34