Questions tagged [python]

Python is an interpreted, general, high-level programming language. Programming questions are off topic. Questions about the use of Python should be asked at Stack Overflow (https://www.stackoverflow.com) instead.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
16 views

Failed to execute Script Main in PYTHON [closed]

I have a .exe app that used to work for years in my work's office. But now, it doesnt open and gives me "Fatal Error- Failed to execute script main". I sent the file to my home PC, and it ...
user1803943's user avatar
0 votes
0 answers
8 views

How to access sharepoint files on task scheduler when not logged in

I have a powerflow setup saving certain email attachments to a sharepoint folder. Our sharepoint syncs to onedrive. I have a python script that takes these excel files, reworks them and saves them to ...
CLK85's user avatar
  • 1
0 votes
0 answers
9 views

how to add source paths on script Rename multiple images using text files - python [migrated]

I want to add "source_paths" to my script so that it can run on an external directory using cmd.bat Example cmd.bat echo off Rename.py [Folder_Images] [listname.txt] pause code script ...
jastinmalkom's user avatar
0 votes
0 answers
4 views

Best way to test a Python library with Grype [migrated]

Part of my workplace's policy for getting permission to use libraries and extensions is to run a Grype scan on it. I want to use some Python libraries, which can be installed from GitHub, but my ...
Sean Duggan's user avatar
0 votes
0 answers
31 views

Windows 11 on 16 core processor reduces CPU utilization when minimizing python processing console window - WHY?

I have a weird issue when doing long term image processing on my 16 core 24 thread i7 13700k processor, on windows 11 pro. My processing lasts for hours so I fire up several python scripts in ...
Erik Groen's user avatar
0 votes
0 answers
30 views

"This view is read-only" in IntelliJ IDEA

I hope this is the correct Stack for this question. I use IntelliJ IDEA to develop Python code and use the iPython support. Often times I switch between editor and console. Often times, the cursor is ...
Bob Jansen's user avatar
0 votes
0 answers
11 views

How can I access the edit environment variables window? [duplicate]

I can't seem to access the edit environment variable editor, I instead get the edit system variable editor when I click on edit. Looking at the other questions, I maybe deleted the original path when ...
Tyuskwo's user avatar
0 votes
0 answers
12 views

Scan Gun returning empty data in Python Script [migrated]

I have a symbol barcode scanner model DS4308 that I am trying to pull scan data from. In my python script, I am using the "hid" library via import hid to connect to the device. Here is the ...
Eric Brown's user avatar
0 votes
0 answers
11 views

Accessing the battery signals for laptop [migrated]

I would like to log the battery signals of my laptop such as voltage, current, and temperature. I mean I want to create a GUI (using Python) to monitor these signals and log them. I'm wondering if it ...
Joondeka's user avatar
0 votes
1 answer
25 views

[screen is terminating], can`t create screen running python script

I was working with my python script for a telegram bot on SSH server. I had multiple screens working together in the background. Then I quitted one of the screens with screen -X -S screenname quit. ...
childoflogos's user avatar
0 votes
0 answers
31 views

How to fix receiving UDP data on windows?

On a windows 10 machine I am running the following python code (3.10.11) to receive data on UDP port 9001 (without any VM running): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.bind((&...
Alex's user avatar
  • 512
1 vote
0 answers
27 views

How To Add VPCS To Cisco Packet Tracer 8.2.1?

I am trying to automate tasks in packet trace version 8.2.1, and I am trying to run some commands on a group of routers using a Python script as described by chatGPT. Here is the script: # Define the ...
Shadi's user avatar
  • 149
0 votes
1 answer
54 views

Run .exe in Linux using wine with user inputs specified in a single command

I want to execute a program XXX.exe in Linux and then enter YYY when the program asks for keyboard inputs. I can do this using the following steps: wine XXX.exe The program then asks: Enter YYY or ...
Hilary Chang's user avatar
0 votes
0 answers
4 views

Making a binary package for my open source project [migrated]

I currently have the following open source project, https://github.com/nadermx/backgroundremover I followed the tutorial https://betterscientificsoftware.github.io/python-for-hpc/tutorials/python-pypi-...
nadermx's user avatar
  • 647
0 votes
0 answers
6 views

How to create a small python code to get a list of participants of a teams call? [migrated]

Using python, and having an azure applicationID/ objectID/ tenantID / clientID and clientSecret I want to access a "teams" meeting using e.g. requests to get the list of participants of an ...
Alex's user avatar
  • 512
0 votes
0 answers
10 views

AUC drops below 0.5 even though dataset is similar [migrated]

I'm programming an anomaly detection on a given dataset: Toyadmos dataset: https://arxiv.org/abs/1908.03299 Of this dataset, I'm investigating the ToyCar data, which has '4 cases': (quote)"Each “...
Brecht De Cock's user avatar
0 votes
0 answers
19 views

How can I setup RPC using a file system to sync and transfer data instead of a network?

I have two separate networks, and due to network security policies the only bridge between the two is a SMB network share. How can I setup an RPC system (targeting Python but casting a wider net here) ...
Geordie's user avatar
  • 422
0 votes
1 answer
13 views

JupyterLab doesn't run due to AssertionError

I have used pip to install JupyterLab on my machine that runs Pop!_OS. The installation succeeds, but when I attempt to run the program, I get this error: Traceback (most recent call last): File &...
Linter's user avatar
  • 111
0 votes
0 answers
7 views

raspberry pi audio drivers not working with python [migrated]

I have a problem where I have been trying to get a raspberry pi to run this program* but it keeps giving me this error I have tried reinstalling the drivers, changing over the input and output to ...
Jim Bellette's user avatar
-1 votes
0 answers
19 views

When i try run a .py folder in pycharm folder Error occures

The error is : Process finished with exit code 2 C:\Users\GLOBAL INFO LAGA\AppData\Local\Programs\Python\Python311\python.exe: can't open file 'C:\Users\GLOBAL INFO LAGA\PycharmProjects\HelloWorld\...
PythonUser's user avatar
0 votes
0 answers
42 views

Weird requests to home server and possible security breaches

I am trying my hands on hosting a Django web app on my home server. I never fail to get weird requests from unknown IPs all around the world, such as the ones below: Not Found: /ecp/Current/exporttool/...
Sati's user avatar
  • 111
2 votes
1 answer
44 views

How Are My Python Installations' Command Names Determined, and Can I Change Them?

I recently installed 3 versions of Python on my Windows 10 machine: Python 3.8, Python 3.10, and Python 3.11. I have added all of them to Path . I have successfully run Python3.8 by typing in python ...
Anon Anon's user avatar
0 votes
1 answer
39 views

How can I set a file located in the Roaming Folder as an Environment Variable? [duplicate]

I have installed Jupyter on my Windows. The jupyter.exe command looks like stored in C:\Users\XXXX\AppData\Roaming\Python\Python310\Scripts. C:\Users\XXXX\AppData\Roaming\Python\Python310\Scripts>...
Jordy's user avatar
  • 101
0 votes
0 answers
43 views

Batch script error image upload

Wrote a batch script file that uploads an image to smugmug using the smugcli cmd tool in Python. Now I'm getting an error creating an album. I think it has something to do with the special character ...
BertW's user avatar
  • 1
1 vote
0 answers
11 views

VSCode Test Discovery Conflict, lib vs local

I am experiencing an issue with Visual Studio Code test discovery hoping to get some insight. I believe this is due to a conflict between the Python lib vs. local. Context I have a custom package (let'...
YTKme's user avatar
  • 40
0 votes
0 answers
12 views

How can I get the list of mirrored packages to be showed in the devpi web application?

I have two devpi instances in two machines. In one instance I created a mirror of an index existing in the other instance. devpi index my-user/dev type=mirror mirror_url=http://<devpi_address>:&...
A.B.V.'s user avatar
  • 1
0 votes
2 answers
108 views

Pipe Python command output to netcat without sending an EOF

I have access to an external netcat server to which I am trying to send a large input. I am currently trying to do so with this command: python -c 'print("a" * (50000-64))' | nc www.host.net ...
TheDoctor025's user avatar
1 vote
1 answer
73 views

Scheduled Python task no more executing

I have a backup task written in Python 3.7.1 and I scheduled it for automatic daily execution via the Task Scheduler. Until recently, it worked seamlessly, and I could see its activity on a console. ...
Yves Daoust's user avatar
1 vote
1 answer
168 views

How to use `python` again in windows PowerShell?

As of yesterday I could run a python command like python code.py on a windows 10 powershell command line. After an update this does not work anymore and I get an error Python was not found; run ...
Alex's user avatar
  • 512
0 votes
0 answers
172 views

Building wheel for ansible (setup.py) ... error, unable to install ansible

I am trying to install ansible via pip, but installation failed with these errors. Basicly the core ansible is installed but I have a feeling that not all modules/ ansible_collections are installed #...
andrew's user avatar
  • 101
1 vote
0 answers
44 views

How to kali linux "poetry run python empire.py server" can working

I entered sudo poetry run python empire.py server and it returned Traceback (most recent call last): File "/opt/Empire/empire.py", line 11, in import empire.server.server as server File &...
Dopa's user avatar
  • 11
0 votes
1 answer
111 views

In powershell to treat string as raw sting

I have to go to this C:\Users\user\Documents\code\dart\learning_dart\bin\string_lerning\ directory in Powershell I can use cd C:\\Users\\user\\Documents\\code\\dart\\learning_dart\\bin\\...
Udesh's user avatar
  • 776
0 votes
0 answers
54 views

Django cant find the temporary folder when it try to save a big file

I am trying to save big images in my Django project, but when Django does it I get this stack traceback: Traceback (most recent call last): File "/Users/sokov/PycharmProjects/4utra/venv/lib/...
Sergei Sokov's user avatar
0 votes
1 answer
16 views

Streaming data and firewall on Chromebook Linux

I'm trying to use a custom python app that needs to expose a port (5000) on my Google chromebook and it's not working. The python package is python-osc. How do I check if a firewall in Linux is ...
tom's user avatar
  • 101
0 votes
0 answers
37 views

How does VSCode determine which is the global and recommanded version of my python interpreter?

I use pyenv to manage versions of python on my Windows machine. When I use the VSCode command Python: Select Interpreter it detects two versions of Python: Before I change it, the default interpreter ...
Nicryc's user avatar
  • 645
0 votes
0 answers
139 views

Using rsync and ssh inside python script to specific folder

I am attempting to make a copy of the /home folder on a remote Raspberry Pi (pitwo) to a local Raspberry Pi (pizero) via rsync and ssh. The local Pi has a hard drive connected that is shared using ...
Kevin's user avatar
  • 21
0 votes
1 answer
70 views

'pip install pycups' errors out with exit status 1

I'm installing Odoo 8, with Python 2.7 and pip 20.3.4. I know the version of Odoo is old but I need to use it. I can't install pycups, and I can't figure out the problem. Collecting pycups Using ...
Victor Daniel Witoszek's user avatar
0 votes
0 answers
43 views

How do I write into a read-only folder on windows using ubuntu in WSL?

I've been trying to install stuff on the arcgis version of python, but because ArcGIS installs its python executable and environments inside program files, conda in ubuntu WSL throws back: ...
Reuben's user avatar
  • 1
1 vote
1 answer
34 views

How to extract numbers from rsync stats output

I am using rsync to back up a Raspberry Pi. The rsync command runs inside a python script: import os os.system('sudo rsync -avzh --stats /etc /home /usr /mnt/BigMac/BigMac/PiBackups/PiZero') The ...
Kevin's user avatar
  • 21
0 votes
1 answer
58 views

Regex that will only match in filenames

I need a regex that will only match whatever is in the filename even when I give it the whole path, for example matching for x64 and nono: x64/x64/x64/lol/me.me <- will NOT match nono.meme <- ...
LUKISO2's user avatar
0 votes
1 answer
18 views

Running paparzzi UAV in git bash

I got this error when trying to running paparazzi UAV in git bash. can anyone help me solve this problem ? /usr/bin/env: ‘/usr/bin/python3’: No such file or directory
Amrhus's user avatar
  • 1
-2 votes
1 answer
83 views

CMD/Python: Guess your .docx or .txt file's encoding

Ok, I want to find out, what kind of files I have, for encoding. I tried to read the file with encoding='UTF-8' and it failed, which indicates that the document is not utf8-encoded. Of course, I could ...
Just Me's user avatar
  • 804
1 vote
1 answer
87 views

Converting text files to docx via dotx

Given thousands of text files, how do you convert text files (.txt) to Word files (.docx) using a template (.dotx)? Is there any command line for Windows to perform the task? Python code should work ...
Laura's user avatar
  • 111
0 votes
0 answers
142 views

How to install python 3.9 (32bit) to Linux server (without GUI) via wine?

I'm struggle with the problem: I have a Python app that works fine in Windows, but this script need to be running in Linux Ubuntu server. Script bases on the library that works only in 32bit version ...
NikGovn's user avatar
0 votes
1 answer
106 views

How can I download a python package with dependencies for a specific python version of an offline cross-platform?

I have an online Windows PC with Python 3.10.10 and pip 23.0.1. I want to download a python package and its dependencies for an offline computer that has a 64-bit Linux and Python 3.6.8. I tried: pip ...
stackprotector's user avatar
0 votes
0 answers
109 views

GHunt error for check_and_gen.py'

while installing GHunt on Kali Linux with Python version 3.9, check_and_gen.py file is not generating. Following error: python3: can't open file '/home/kali/GHunt/check_and_gen.py': [Errno 2] No such ...
Bharat Oam's user avatar
0 votes
0 answers
21 views

How to find RDFLib installation on Windows and add it to the path (Environment Variables)

I am using Anaconda on windows. I have installed RDFLib through Jupyter Notebooks. My programs using RDFLib work without problems. I downloaded my program on Jupyter Notebook as myfile.py file, and I ...
Karl 17302's user avatar
0 votes
1 answer
42 views

I installed beautiful-atoms with pip but it cannot find blender

There is this nice python module to render beautiful atoms using Blender's Python API I installed everything using pip on Ubuntu 22 LTS without problems >> pip install bpy >> pip install ...
Prokop Hapala's user avatar
1 vote
1 answer
286 views

How to have one process listen to a serial port that another process is writing to?

I have a process (in bash) that writes data to a serial port. I would like to see that data, but instead of hooking up an Arduino and showing the data on a display, I thought it would be easier to ...
OZ1SEJ's user avatar
  • 111
0 votes
1 answer
234 views

Open multiple instances of Python .py files/code with CMD (command prompt) with .bat extension

I try to open multiple instances of Python .py files/code with CMD (command prompt). So, I made a file with .bat extension, and I run it every time I want to open multiple .py files/code. This is the ...
Just Me's user avatar
  • 804

1
2 3 4 5
62