Trying to scrape Canon Webpage using selenium
One of the categories has Load More button which load cameras. I need to write function that scrolls to Load more button and clicks iturl: https://www.usa.canon.com/shop/cameras/mirrorless-camerasdef...
View ArticleIssues with sending emails through Outlook using the Win32 library in Django
I'm using Win32 for sending emails on my website. In general, the emails are sent and reach the recipient, but the problem is that the recipient does not change. Initially, when I started this project,...
View ArticleBest way to use re.sub with a different behavior when first called
I'm trying to perform a number of replacements using re.sub(), except I want the first replacement to be different. One straightforward approach would be to run re.sub() twice with count = 1 for the...
View ArticleHow Python imports an instance of a class
I'm trying to find out how exactly importing works in Python.Let's say I have a foo.py module that contains the following class:class Foo: def __init__(self, *args, **kwargs): ... foo = Foo() Now, I...
View ArticleHow to un pyinstaller converted python app with Shiny for Python
I downloaded and installed Python 3.10.6 on windows 10 pro, installed Shiny for Python, created the sample app and run it. This worked fine.I installed pyinstaller and converted the app to an exe. I...
View ArticleProgress Bar using patoolib while extracting an archive
The title is self-explanatoryIs there a a built-in method to show progress at the moment it just:INFO patool: Extracting data/THE_Archive Extreme Edition.7z ...INFO patool: running...
View Articleopenpyxl active cell cant copy cell
I need help with a problem I've been having for a while.I'm creating an automation that copies information from Excel to another application (like Notepad).At first, I was using Pyautogui to copy and...
View ArticleVisual Studio Code Not Recognizing findent Installation for Modern Fortran...
I am working with the Modern Fortran extension in Visual Studio Code on Windows and keep encountering a persistent issue. Despite having correctly installed findent, fortran-language-server, and...
View ArticleHow do I set environment variables in a pytest fixture with the MonkeyPatch...
I'm not using classes or test cases I'm just using pytest functions (want to keep it that way).This does not work:@pytest.fixture(scope="function")def set_env(): with MonkeyPatch.context() as mp:...
View ArticleCombining two python programs in raspberry pi 5
Is there a smooth method to integrate two Python scripts on a Raspberry Pi 5? The first script involves speech recognition, converting spoken words into text. The second script converts text into...
View ArticleA telegram bot should send a "quiz" how to do it?
@bot.callback_query_handler(func=lambda call: True)def callback_handler(call): if call.data == 'start': question = "Which city is the capital of France?" options = ["Paris", "Berlin", "Madrid",...
View ArticleTkinter Error, _tkinter.TclError, two progress bar windows show up...
Thanks for stopping by at my post; as amateur python writer, I'm writing a code to schedule a Copy & Paste process based on time previously defined by a user.There should be 3 different times in...
View ArticleI want to install Theano but it doesn't work
I wrote pip install Theano and it marks this:Collecting Theano Using cached Theano-1.0.5.tar.gz (2.8 MB) ERROR: Error [WinError 5] Access is denied while executing command python setup.py egg_info...
View ArticleMonte Carlo 4D integral with variable limit
So, i have this wonderfull function f(th,k,p,n,W) that i need to integrate over 4 variables, but one of them, the variable k, goes from 0 to p (then i integrate over p). I've tried doing this...
View ArticleFileNotFoundError: [WinError 2] The system cannot find the file specified -...
I am running a script using conda environment on Windows and getting this error (stack trace below), which is apparently caused by python executable not being able to find the ffmpeg.exe. There are...
View ArticleHow do I generate ngroups from a comparison function?
Suppose I have a function that compares rows in a dataframe:def comp(lhs: pandas.Series, rhs: pandas.Series) -> bool: if lhs.id == rhs.id: return True if abs(lhs.val1 - rhs.val1) < 1e-8: if...
View ArticleHow to access angle and shift information in cv2-reg (OpenCV)?
I have trouble with accessing angle and shift information from the cv2.reg objects Documentation. They cannot be called directly as already discussed in other thread.Based on the discussion in the link...
View Articleerreur:Pip could not find a version that satisfies the requirement
Pip could not find a version that satisfies the requirementfind solution for this problem:need helppip install freenectCausing these errors:ERROR: Could not find a version that satisfies the...
View ArticleAerodynamic Forces and moments calculation with python
I would like to know how to calculate the aerodynamic forces (Fx, Fy, Fz) and moments on a wing surface using integration with Python, an example of how my data in the *.CSV file looks...
View ArticleStable diffusion only using half of GPU processing power
I Have been using Stable Diffusion (automatic1111) for a while but when I upgraded to automatic1111 1.8.0 I noticed a massive slowdown in generation times. I tried updating pytorch and xformers but...
View Article