Questions tagged as 'python-3.x'

0
answers

pymysql.err.OperationalError: (2003), I can not connect to the ubuntu server

I created a ubuntu 18.10 server and made it publicly available. I can access the url xx.x.xxx.xx / phpmyadmin , but when I try to connect through python3 I have the following problem: pymysql.err.OperationalError: (2003, "Can't connect to MyS...
asked by 12.11.2018 / 10:34
0
answers

ModuleNotFoundError: No module named 'requests_html'

I'm trying to use the requests-html module in Mac OS 10.14, however, it presents this error both when trying to install with the pip and with easy_install it presents the error saying that there is already this module. I did a test on windows...
asked by 19.11.2018 / 00:24
0
answers

how to solve problems with "referenced before assignment"? [duplicate]

from tkinter import * from tkinter import messagebox jan = Tk() jan.title("Pontuacao") jan.geometry("200x200") pontos = 0 a = Label(jan, text="pontos") a.place(x=0,y=0) def aumentar_pontos(): pontos += 1 messagebox.showinfo(title="A...
asked by 27.11.2018 / 18:42
2
answers

Return a list of all strings in the file containing the searched string [closed]

I'm trying to make a method that scans a list (my list comes from an external file that uses readlines () to assemble a list of strings) and compares with a string passed by parameter. The return for my test run needs to be a len (). I have alre...
asked by 06.11.2018 / 19:20
0
answers

Code runs in Jupyter and VSC of error

IrunthiscodebyJupyteranditrunsnormally,butwhenItrytorunthissamecodeinVisualStudioCodeitgivesthefollowingerror:"File b'Salaries.csv 'does not exist" says that the file does not exist, but there is sim . import pandas as pd import numpy as np...
asked by 06.11.2018 / 12:03
2
answers

Doubt about inserting content from a .txt file into a list

I have a question about inserting the contents of a text file into a list in python. I want to put the first line of a text file in a list. In my code it runs the task but the following message appears: [<_io.TextIOWrapper name='lista2....
asked by 05.11.2018 / 12:29
0
answers

Staticfiles Django Google Cloud Appengine

I'm studying the Google Cloud infrastructure a bit and am experiencing a problem with Django's static files in production. Everything is working normally when I leave DEBUG = True . When I put DEBUG = False and do deploy, it does...
asked by 31.10.2018 / 22:52
0
answers

Receive a keyboard URL and ping it in Python [duplicate]

Receive a typed URL via keyboard Pings its URL Returns the ip (if any) of the URL you typed Eg: Enter a URL: www.google.com Pinging www.google.com [172.217.162.164] with 32 bytes of data:  Reply from 172.217.162.164: bytes = 32 time...
asked by 09.11.2018 / 13:09
1
answer

Get tags inside tags on BeautifulSoup

I have the following situation: <a href="https://g1.globo.com">Globo</a> <h3 class="b"> <a href="https://www.google.com">Google</a> </h3> Using BeautifulSoup, how do I get only the href and tag 'a' text...
asked by 31.10.2018 / 02:25
0
answers

TypeError: expected string or bytes-like object

My code is returning this error    TypeError: expected string or bytes-like object # Importamos a biblioteca: import pymysql import nltk import re lista_excecao = nltk.corpus.stopwords.words('portuguese') lista_excecao.append('é') lista_...
asked by 29.10.2018 / 23:30