2,210,257 questions
0
votes
0
answers
28
views
How to use python to extract files from folder base on the first 7 digits file name
I am still a new learner in writing python script. I have a question here:
I have a "folder" which contain multiple sub folders where I wish to extract PDF files base on the same first 7 ...
-1
votes
0
answers
28
views
Reusing context with Python Playwright
Has anybody been into this use case in using python Playwright .
I wanted to use playwright to a website with login features.
So, as normal process, it will login to the website with its loging ...
0
votes
0
answers
26
views
Apache Flink sinkfunction python code throws exception
The Apache Flink 2.1 does not support mongodb python connectors. So I make the sample python codes by using SinkFunction.
from pyflink.datastream import StreamExecutionEnvironment
from pyflink....
0
votes
0
answers
48
views
how to solve the error of 'Table' object has no attribute 'userId' [closed]
Please how do I solve this error, it occure every time i tried to load the page.
this is the full error i am experiencing:
[2025-08-02 23:32:25,966] ERROR in app: Exception on /admin/createadmin [GET]
...
-1
votes
1
answer
31
views
Pygame image not facing the mouse [duplicate]
Here is my rotating code:
pos = pygame.mouse.get_pos()
x_dist = pos[0] - self.rect.centerx
y_dist = -(pos[1] - self.rect.centery)
self.angle = math.degrees(math.atan2(y_dist, x_dist))
self.image = ...
-3
votes
0
answers
39
views
Get info from a site using selenium, without the website simulator [closed]
I am currently learning Selenium, and I am wondering is there a way to use Selenium to get information for example text of some paragraph without the whole website simulator running?
0
votes
0
answers
48
views
Error: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
When calling the API-
import requests
url = "https://api.themoviedb.org/3/movie/98?language=en-US"
headers = {
"accept": "application/json",
"...
0
votes
2
answers
63
views
How to use index to find position of JSON record [closed]
Is there a better way than iteration using a for loop to find the index of the record?
My problem is that to use index I seem to need the index of the record I'm seeking.
import json
from bs4 import ...
4
votes
4
answers
157
views
Calling python function from C
I am having trouble making a simple "Hello World" python function which I can call from a C program.
Here is the contents of my helloworld.py file:
def hw():
print("Hello World")
...
0
votes
0
answers
46
views
RuntimeWarning: coroutine <aiortc> was never awaited
I am trying to use two Python libraries together: windows-capture and aiortc
Below is the code in my server.py:
import asyncio
from windows_capture import Frame, InternalCaptureControl
from aiohttp ...
0
votes
0
answers
51
views
Selenium Headless vrs Non Headless. I can't get Selenium to set a field while using headless mode
I saw I needed to add a window size however that did not fix my issue
here is the working Non headless code
# _-_-_- Non Headless -_-_-_
from selenium import webdriver
from selenium.webdriver.common....
0
votes
1
answer
29
views
Is this Sumtracker API request correct?
I wish to use the Sumtracker API, and I want to connect and do a basic get for this endpoint.
Let's say that my API key is 1234567890abc. The code is here:
import requests
url = "https://...
0
votes
1
answer
19
views
How to add automatic attributes to the Python Markdown library
I'm trying to import CSS styles into my HTML file exported by the Markdown library, but for some reason the attributes are basic, or so to speak, to generate a clean layout. Is it possible to add ...
-2
votes
2
answers
53
views
Close terminal window opened by .command Python script
I have a Python script. I'd like to double click a file on my desktop (macOS) to run it. I'd like the terminal window opened by running the script to close.
To start, I changed the file extension of ...
1
vote
1
answer
53
views
gdal2tiles.py hangs when run in Conda Docker environment
I'm running a Python script inside a Conda-based Docker container that processes geospatial data. The script runs a two step GDAL workflow, it uses gdaldem colorrelief to create a colorized GeoTIFF, ...