Category "python-3.x"

Trouble running InstaPy quickstart

I was able to install InstaPy on an Oracle Ampere Compute VM (ARM processors) running Ubuntu 20.04 LTS. When I try running quickstart.py, it showed me the follo

FastApi returns "field required" and "value_error.missing" for one of my parameters, but the field is there

I do a Post with some parameters, but one of them returns "field required" and "value_error.missing", but the field is there and it has a value. See the output

Import Error: can't import name gcd from fractions

I'm trying to import a function called gcd from a module called fractions with from fractions import gcd. For some reason, PyCharm throws an ImportError: fr

Can any one explain the logic behind this code [closed]

Sorry for asking this very basic question - but I cannot understand why it does what it does. a = int(input('Enter No. of rows')) for i in ran

How can I set up a VirtualBox interface using a Python library in 2022?

I have a local installation of VirtualBox running on my host machine, which is running Windows 10. I am able to start and run a virtual machine of Ubuntu via th

[mac Monterey][Python 3.10.4][tkinter 8.6] Calling tkinter askOpenfilename crashes when repeatedly creating a window

I have a python program that allows users to repeatedly press a key that will create a tkinter window where they can open an image an manipulate it. The problem

OpenCV get pixels on an ellipse

I'm trying to get the pixels of an ellipse from an image. For example, I draw an ellipse on a random image (sample geeksforgeeks code): import cv2 path = r'C:\U

Unzipping the zipfiles within a url zipfile python

I can unzip a url zip file of csvs using the below code: import requests from zipfile import ZipFile from io import BytesIO import pandas as pd z = 'www.someur

raise exc.NoSuchModuleError( sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgresql

I created a sample flask application, I want to connect PostgreSQL database to my project. I installed flask_sqlalchemy. here is my Code from flask import Flask

why does my program execute an extra line("none") when executed?

I recently wrote a program using oop for an online coffee machine: from menu import Menu from coffee_maker import CoffeeMaker from money_machine import MoneyMa

Operate on .dat file, pickle mod

I have project to do in my studies and it is my first project in Python. I must create simply program for bank. With GUI I'm creating an account on classes and

Django app runs locally but I get CSRF verification failed on Heroku

My app runs fine at heroku local but after deployed to Heroku, every time I try to login/register/login as admin, it returns this error shown below. I have trie

Error when doing a PUTITEM type: <class 'str'>, valid types: <class 'dict'>

When doing a putitem to dynamo it is giving me the following error, the json I am reading from s3. this is the code dictItems = json.load(object_summary.get(

Python 3.8.0 Setup Failed - 0x80070666 Another version of this product is already installed / No Python installation detected

I installed 3.8.7, the dependencies didn't match up with the project I was trying so I uninstalled 3.8.7 and wanted to try 3.8.0. I get this error every time. T

How can I transform a hdf5 file into a text file?

have been trying to read an .hdf5 file so that I can plot some of the data, to do so I thought I would take the data in the .hdf5 file and process it into a .tx

Python2.7 no smb module. Cant locate

Running kali 2020, I am trying to run CVE-2007-2447 which is a python2.7 script, which says: import smb from smb.SMBConnection import SMBConnection I saved th

How do you get and use a Refresh Token for the Dropbox API (Python 3.x)

As the title says, I am trying to generate a refresh token, and then I would like to use the refresh token to get short lived Access tokens. There is a problem

I am prepared permit EIP712, but tx "Reverted", function selector 'Reverted 0x08c379a

I'm trying to send a permit for a transaction, but I get a function call mismatch return if I call through the smartcontract token function. If I call via encod

Why can't dunder/magic methods be set in unittest.mock.Mock.configure_mock?

I was writing some unit test in python and needed to mock a very general collections.abc.Sized, so I set off creating a Mock with a __len__ method whose return

discord.py MemberNotFound exception when passing a real member

When I pass *grant @user add in Discord I get the following exception: Ignoring exception in command grant: Traceback (most recent call last): File "/Users/te