Questions tagged as 'python'

1
answer

moviepy: reduce video to 100mb

I would like to know if there is a way to reduce a video to 100mb. I have some videos and I want to convert it to 100mb, regardless of the quality of the video. In this example, I reduce to 360p in quality import moviepy.editor as mp clip =...
asked by 10.11.2018 / 00:31
0
answers

Naming Python Classes [duplicate]

Speak up. I'm trying to learn Python on my own. And he painted the following question: how to name my files? I want to create a set of classes and use these classes in my program as I do? Does each class have to be in a separate file? with the...
asked by 19.11.2018 / 13:38
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

RelatedObjectDoesNotExist (Django)

I have the error RelatedObjectDoesNotExist, follow the Traceback. Traceback: File "/usr/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner   34. response = get_response (request) File "/usr/lib/python3.7/site-packages/...
asked by 22.11.2018 / 16:27
0
answers

Problem with python in postgres on mac

People, I'm testing trigger functions with python in Postgres and I'm having problems when I test on my Mac. Here's the function: create function sendchange() returns trigger as $$ import requests import json url = "http://localhost:8080/send...
asked by 22.11.2018 / 13:58
1
answer

Back-end Python for Front-end [closed]

I made a simple application that registers a data in a sqlite3 database, all this part of the Back-end is done in Python with .py files running in the same terminal, so my use already serves me excellently. Now I want to visualize the data in a...
asked by 08.11.2018 / 19:50
2
answers

Problem in the Pickle library in Python

So, trying to apply the following code, but the compiler is giving me the following problem, I can not think of anything other than an installation problem, but I got this problem on two different computers with the same code: import pickle a...
asked by 08.11.2018 / 05:56
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
0
answers

How to move a file to a folder that the code itself created? (python)

Good afternoon, guys. I wrote a program so that after the user enters a name, a folder with this name will be created and then a file (from another folder) will be moved to it. The folder is created, but I'm getting an error while trying to move...
asked by 13.11.2018 / 18:05
3
answers

How to validate if a value is a tuple having a string and an integer? [closed]

I want to write a function that takes an argument (any type) and returns true if the argument is a tuple (double, double elements of 2), where 1 is a name ( str ) and 2 is an age (% with%). Otherwise it returns int . My fir...
asked by 05.11.2018 / 11:32