Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
150 views

I would want to copy sys.stdout such that it will not be closed. There is some generic code that does: def dosomething(fd: IO[bytes], input): with fd as f: for buf in input: f.write(...
KamilCuk's user avatar
  • 146k
0 votes
0 answers
31 views

I am trying to implement the ENERGYM library in Python as per the following paper: https://www.mdpi.com/2076-3417/11/8/3518 and https://bsl546.github.io/energym-pages/sources/install_min.html After ...
Matthew Fleishman's user avatar
-3 votes
2 answers
81 views

I'm using python 3.7. I have a list of dicts that and I want to create a concatenated dict where that concatenated dicts sums over values (grouped by keys) per key in the initial list of dicts. So e.g....
24n8's user avatar
  • 2,338
1 vote
0 answers
115 views

noob here. I am currently trying to run this project: https://github.com/katsuma-inoue/soft_skeleton_solver I was able to install all the listed packages, except scikit-fmm which keeps failing, with ...
Eric14003's user avatar
0 votes
2 answers
140 views

With this code below: import requests, os from selenium import webdriver from selenium.webdriver.chrome.service import Service as ChromeService from webdriver_manager.chrome import ChromeDriverManager ...
Peter.k's user avatar
  • 1,548
1 vote
3 answers
3k views

I'm trying to install bpy using pip install bpy. According to their website: https://pypi.org/project/bpy/, version 4.3.0 is the latest (and was released in November 2024). Is there any way of using ...
Robert Goddard-Wright's user avatar
0 votes
1 answer
57 views

I'm getting the weirdest error while converting an application from Python 2 to Python 3. Briefly this application uses wxPython to create an interface where the user can draw different objects on a ...
SickNebo's user avatar
-1 votes
1 answer
85 views

I'm trying to do some custom serialization/deserialization and must be able to handle custom data-classes, even local ones within functions. I found a question about this with a proper solution, but ...
freakinpenguin's user avatar
1 vote
0 answers
50 views

If I install Python via pyenv, will there be conflicts if I previosuly used sudo apt-get install python3? I have used pyenv to get a specific version (3.7.5) to revive an old project running in a ...
BadProgrammer's user avatar
0 votes
0 answers
90 views

I'm running into an issue with the input() function in python 3.7.9. Under certain conditions, all keyboard input is no longer being reflected on screen and [ENTER/RETURN] key no longer submits the ...
Levithan6785's user avatar
1 vote
0 answers
46 views

Context: I am trying to find out the depth between two CFGs using BFS but the code is not properly working as it's only showing the results up to depth 0 and 1 but it's not showing the other depths ...
tamanna's user avatar
  • 11
0 votes
1 answer
105 views

I am trying to solve a mathematical problem using python 3.7.0 . For this I've installed CPLEX 12.10 and I decided to install some dependencies, like numpy, prettytable and picos. Numpy and ...
Gabriel Cardoso's user avatar
1 vote
0 answers
360 views

I am working on a project for Meta Review Generation. I have picked my base paper as "MReD: A Meta-Review Dataset for Structure-Controllable Text Generation", the code and the data are give ...
Sourabh Garg's user avatar
1 vote
0 answers
218 views

I am trying to install this Python package as per the instructions, resulting in this error: ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==2.5.0 (from rascore) (from ...
Jenni's user avatar
  • 11
-1 votes
1 answer
72 views

I recently updated to a new version of flask/python/google app engine. I have the controller below. @app.route('/area/entity/<int:video_id>/subentity/<int:collection_id>/', methods=['POST']...
ffejrekaburb's user avatar
0 votes
0 answers
120 views

I've installed ChatterBot 1.0.0 (due to the unavailability of the other versions) with pip: pip install chatterbot==1.0.0 and for some reason, IDLE is returning with this output: Traceback (most ...
ThatRandomGuy's user avatar
0 votes
1 answer
913 views

I have an application that unfortunately does not support Python past 3.7. I have some code I'm trying to port (from Python 3.12) back to Python 3.7 that uses importlib.resources.files to get the path ...
Jason C's user avatar
  • 40.6k
-1 votes
2 answers
129 views

I have three versions of python 3.9.11 3.11.8 3.12.2 I have installed all the versions. Now when I am trying to check all the versions of python I installed using commands py -0 #Doesn't Working ...
Abhishek's user avatar
0 votes
0 answers
77 views

I am trying to import fitsio version 1.2.1 on python 3.7.0. However, I receive the following error "ImportError: /home/apc44/anaconda3/envs/pylab_py37/lib/python3.7/site-packages/fitsio/...
user23669209's user avatar
0 votes
1 answer
436 views

I am trying to run a project. My TensorFlow version is 2.9.2. I need to import BatchNormalization, but I cannot import it. Here is the error message: AttributeError: module 'tensorflow.python.keras....
vic's user avatar
  • 1
2 votes
1 answer
467 views

First time asking a question here. So I have been task to create a script that checks if a device is reachable via ping. Just liek to point out that I was able to create a working script on my laptop ...
whitemilkfish's user avatar
1 vote
1 answer
87 views

The error occurs at the import statement on a Raspberry Pi (Linux rp3b 5.10.17-v7+ #1414 SMP Fri Apr 30 13:18:35 BST 2021 armv7l GNU/Linux ) before doing stuff. What's wrong here? #!/usr/bin/python3 # ...
monok's user avatar
  • 595
0 votes
0 answers
67 views

**I'm trying to upload an image as base64 to a database on pythonanywhere, and be able to retrieve those images and display them. I have this code, which works completely: ** root = tk.Tk() root....
biancabeavis's user avatar
-1 votes
1 answer
433 views

I am trying to run a local already done django project but I get this subprocess error while trying to install these to packages. I'm using python3.7 and my device is mac OS. These are the main errors:...
Barbod Imani's user avatar
0 votes
1 answer
220 views

When executing this piece of code: from pypdf import PdfReader,PdfWriter import traceback try: input_pdf = PdfReader(dwnld_filepath) output_pdf = PdfWriter() image = input_pdf.pages[0] ...
MUHAMMED SHAFEERALI P's user avatar
0 votes
1 answer
498 views

I'm trying to install Python3.7 on ubuntu 16.04. I tried the installation steps on the internet, but I got an error code. My installation steps: sudo apt update sudo apt install software-properties-...
Eggsy's user avatar
  • 11
2 votes
1 answer
215 views

I am running conda via a standard miniconda3 installation on Ubuntu 20.04. I need a Python 3.7 environment and have the following simplified conda environment file (test_env.yaml): name: test-env ...
olamarre's user avatar
  • 175
0 votes
1 answer
144 views

I wanted to play a .mp3 file to my microphone using python code that I found in a Stack Overflow post, but I had to do some tweaking with the steps I had to take. Here are the steps that I had to do: ...
Markas M's user avatar
0 votes
1 answer
490 views

ModuleNotFoundError: no module named XY XY is the cloned repository The above error is a result of the import statement at the beginning of the training file. I have cloned a repository from GitHub ...
Sachin Bharadwaj Manjunath's user avatar
0 votes
0 answers
288 views

I have over 100 scripts that are not compatible with 3.12. While technically possible to complete manually, this would be quite time intensive. Is there something like lib2to3 that can update these ...
Andrew's user avatar
  • 23
0 votes
1 answer
598 views

I am using Pycharm on Windows 10 and needed to install py2exe package. So I tried to install it with the github repository "https://github.com/lambacck/py2exe-3 ". I don't know what is the ...
Arun Jothi's user avatar
2 votes
1 answer
212 views

I have created a script where I read from a list of column names that need to be deleted and specified a list of directories to scan for the sql and python files to find a match using the python - ...
punsoca's user avatar
  • 607
0 votes
1 answer
164 views

Im using Python 3.7 and the im viewissue <itemID> command of Integrity Client 12.5. When I query and item using this in cmd, I get every detail perfectly decoded, no unknown bytes or hexadecimal ...
Daniel's user avatar
  • 25
0 votes
0 answers
296 views

I've just tried upgrading up to python3.9.5 from 3.7 and I'm encountering a strange behavior that I can't quite nail down. It involves pandas1.3 and pymysql1.1.0. The strange part is that the ...
Derek_P's user avatar
  • 666
1 vote
1 answer
69 views

I have hidden id and password in this question. But, gmail password was generated after turning on 2 step verification and generating an app password. ERROR-- AttributeError: module 'smtplib' has no ...
Sentinal's user avatar
4 votes
1 answer
234 views

More often than not, I make the following mistake: import enum class StatusValues(enum.Enum): one = "one" two = "two" def status_is_one(status: str): return status == ...
KamilCuk's user avatar
  • 146k
0 votes
1 answer
191 views

Good morning. I have an application in Python 3.7 which uses several libraries and files that has the following structure: app2: - Blockchain - db - secrets - smartcontrats - utils - menu....
J.A's user avatar
  • 1
2 votes
1 answer
4k views

I tried this approach but got: add-apt-repository ppa:deadsnakes/ppa Error processing line 1 of /usr/local/lib/python3.5/dist-packages/distutils-precedence.pth: Traceback (most recent call last): ...
personal_cloud's user avatar
-3 votes
1 answer
453 views

I got this error message while trying to run my main.py: Traceback (most recent call last): File "main.py", line 5, in <module> from preview import generate_preview_image File "...
J Peg's user avatar
  • 17
0 votes
0 answers
587 views

I want to make a python application that connects directly to the database. I got it to work with ssl required, but setting it to verify CA the connection fails. In datagrip, I checked the 'use ssl' ...
brian_wukong's user avatar
1 vote
2 answers
2k views

I run multiple python-encapsulated exe programs on the server. After the environment resources of each program are released, there are about 20 G, which causes the C drive to be full. I try to delete ...
starhu's user avatar
  • 11
0 votes
2 answers
66 views

I'm trying to login with this library of python. Here is code what I tried. Python import gd def _session_(username, password): try: client = gd.Client() client.login(username, ...
user avatar
0 votes
0 answers
89 views

I need to change every second column's background color. columns = ('ID', 'type', 'name', 'CECQ code', 'QR code', 'location', 'placement', 'edition date', 'description', 'Check') listBox = Treeview(...
Marcin's user avatar
  • 1
0 votes
0 answers
185 views

> import tkinter > import tkinter as tk > from tkinter import ttk > from tkinter import messagebox > import sqlite3 # CREEAREA APLICATIEI + CONFIGURAREA ACESTEIA root = tk.Tk() root....
Spravil Carina's user avatar
1 vote
1 answer
2k views

I am using Pygwalker to create some charts for my analysis, but I am unable to save the charts I have created. Every time I reopen the notebook or refresh the notebook page, the charts I made before ...
Kytscho J.'s user avatar
0 votes
1 answer
148 views

I`m loading the Word2Vec models with the code below: model = gensim.models.KeyedVectors.load_word2vec_format('cc.en.300.vec',binary=False,encoding='utf8') return model.wv It takes over 10 minutes ...
Milad Xandi's user avatar
1 vote
1 answer
941 views

While Installing smbus The Same error kept occuring which was [WinError 2] The system cannot find the file specified i am using python 3.7 and i am wondering why this error is occuring to install it i ...
Seán Moran's user avatar
1 vote
0 answers
169 views

I'm attempting to install codalab worksheets cli. I have a Mac M2 machine, with a python version 3.10 installed through homebrew. I tried just pip installing the codalab package, but it didn't work ...
rel-s's user avatar
  • 6,148
0 votes
1 answer
98 views

I am new to OOP with Tkinter but have made some applications implementing minimal OOP from Tkinter - the classic frame1 = Frame(root, bg="black") rather than using classes. I have tried many ...
TheOccupator's user avatar
0 votes
1 answer
558 views

I have the following classes setup: class A: pass class B(A): pass class C(A): pass Then I have a method that gets called with 2 arguments: x -> always a string y -> one of the ...
KSS's user avatar
  • 179

1
2 3 4 5
82