Questions tagged as 'python'

0
answers

how to run a function at a specific time in python

How can I execute a function of a python script every certain hour? This is what I have so far: import sched import time def saludar(): print("hola") programador = sched.scheduler() programador.enterabs(time, 1, saludar()) programador.ru...
asked by 10.08.2018 / 02:50
0
answers

Masks, coordinates and loop in Python

I'm starting with Python and I wanted to know if someone could help me, I need to mask a fragment of an image through a mask, and then store the coordinate values and use them for another loop to scroll through the other images inside the folder...
asked by 08.08.2018 / 14:09
0
answers

Django URL Reset Password Error

I have the following problem with the authentication system URLs of Django . I request to reset my password, an email arrives with the following link: link After that, I go to that link and it takes me to the following URL:...
asked by 08.08.2018 / 12:40
0
answers

I tried to create a virtual assistant in pyhton but when starting my code the microphone of my computer does not detect it and ends with -1

import pyttsx3 import speech_recognition as sr import pocketsphinx import pyaudio engine =pyttsx3.init() def speak(text): engine.say(text) engine.runAndWait() def mainfunction(): a = r.listen(source) user = r.recognize_sphinx(a)...
asked by 08.08.2018 / 02:55
0
answers

Hosting me the error Invalid command 'PassengerAppRoot

I have a shared hosting service that Python supports. When creating the python project and wanting to visualize it in passenger_wsgi.py working, I do not see anything running and according to my provider sends this log: /home/ddgarcia/public_h...
asked by 16.08.2018 / 21:20
0
answers

Enter data to Elasticsearch

Does anyone know how I can enter a lot of data into elasticsearch? I used logstash, but the connection fails because so many data. I've dealt with Bulk API from Python, but it's too slow. and I used re index api, but I get an "s_s_l_handshake...
asked by 16.08.2018 / 21:27
0
answers

ConnectionAbortedError, AttributeError: Django

I am running an application in console with the command python manage.py runserver The application works well, the queries are correct, etc. However, it shows me the following exceptions: ConnectionAbortedError: [WinError 10053] Se ha anula...
asked by 08.08.2018 / 15:02
1
answer

Calculate Commissions

I need to calculate the commission a doctor must have for the laboratory tests he sends his patients. In other words, the laboratory pays you for each order sent. Here I have the commission parameterization table: class Comisiones(models.Mo...
asked by 08.08.2018 / 16:48
0
answers

escpos AttributeError: function 'usb_detach_kernel_driver_np' not found

I just want to print a ticket using escpos in windows but it throws me the following error: AttributeError: function 'usb_detach_kernel_driver_np' not found this is the code: from escpos.printer import Usb p = Usb(0x1A86,0x7584,0,0x82,0...
asked by 05.08.2018 / 21:25
0
answers

Sublime Text 3 error: Attribute error (str object has not attribute items

in Sublime Text 3, when selecting any of the options, tools / SublimeREPL / Python / I get the following error message: Attribute error (str object has not attribute items thank you very much     
asked by 05.08.2018 / 18:17