Questions tagged as 'python'

1
answer

TypeError: send_email () takes exactly 1 argument (0 given)

I have a code and I need to use threads, but always squeeze threads to give this error. import pyHook import pythoncom import os import threading import time import tempfile import datetime import smtplib from email.mime.text import MIMEText f...
asked by 07.06.2018 / 15:24
1
answer

badly formatted XML

I'm trying to read some XML files with the Element Tree of Python, but one of them, when I go to do the parser gives me this error:    xml.etree.ElementTree.ParseError: not well-formed (invalid token) This is the line that gives the err...
asked by 06.06.2018 / 13:50
3
answers

Web scraping python running javascript on CEF website [closed]

CEF changed the way it displays lottery results on its site, before I was able to get the results that all came into HTML via webscraping relatively easily using BealtfulSoup, but now those results are displayed running via javascript browser. I...
asked by 05.06.2018 / 22:50
0
answers

Import math into python 3.6 (pycharm)

I'm starting my studies in programming, I decided to start with python, and in one of the videotapes the teacher said to type: import math But when I type import I can not find this library, and videotape is dated from last year. I would li...
asked by 01.07.2018 / 00:55
2
answers

Importing library into python

Hello, I'm not able to import any library in python using pycharm. When I type, for example, the command import time , the words go gray and do not bring anything.     
asked by 12.06.2018 / 03:04
1
answer

"ArrayList" in Django

I am developing an application for the generation of reports of fiber-optic certifications, and such reports are elaborated by importing XML and TXT files. The question is this: A certification is made within an "Excerpt", which has the follo...
asked by 09.07.2018 / 23:34
1
answer

requests.exceptions.SSLError: certificate verify failed

I'm having a big problem with Django requests. In the last few months I've upgraded to Django 2.0, and I'm updating all the libs. I noticed that this impacted on a number of scripts I had, mostly those that talk to https. For example, my Push...
asked by 30.05.2018 / 17:51
1
answer

How to click on a link in a frame using Selenium WebDriver?

I'm studying a book Automating Massive Tasks with Python. I'm on page 317 that talks about Selenium WebDriver about methods of finding elements on pages. Table 11.3 - The Selenium WebDriver methods for finding elements. After doing this littl...
asked by 14.06.2018 / 08:04
1
answer

Return message from else

I'm doing a very simple example using Django. In my view I have the following: def index(request,idade): string = ''' {% if idoso >= 65 %} Você já é idoso {% else %} Você não é idoso {...
asked by 29.05.2018 / 15:30
1
answer

Error when running PIP command in Docker

I have a python project that runs inside a Docker. When the (Build) image is assembled reliably from a RUN pip install -r requirements.txt but when it executes the command it returns a connection error. Complete Dockerfile FROM pyt...
asked by 05.06.2018 / 22:09