Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Bugs & Fixes 2 years ago
Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I have been using this function https://stackoverflow.com/a/48267887/11220889 for waiting for downloads to finish and returning the file path once finished. And it has been working great until now.
The Function
def every_downloads_chrome(driver): if not driver.current_url.startswith("chrome://downloads"): driver.get("chrome://downloads/") return driver.execute_script(''' var items = downloads.Manager.get().items_; if (items.every(e => e.state === "COMPLETE")) return items.map(e => e.file_url); ''')
How its called
paths = WebDriverWait(driver, 120, 1).until(every_downloads_chrome)
Error I'm receiving
TypeError: 'NoneType' object is not subscriptable
So from what I can gather something has changed that has started causing the function to not return a path. I believe this is due to a change within chrome or even more specifically the chrome driver. My two reasons for this assumption is:
1) I had this function in another code that my colleague was using and she called me saying it was producing this error yesterday.
2)Neither code has changed so the change must be in chrome
I would like to keep using this script but if not possible have another function that waits for the downloads to finish and returns the paths and ideally does it all through the driver not through file path since multiple users use my codes on multiple machines.
EDIT: Versions-
Name: selenium Version: 3.141.0 Name: Chrome Browser Version: 73.0.3683.86 Name: Chrome Driver Version: 2.43.600210 Name: System Version: Windows 10 Pro x64
As per the error message:
Your main issue seems to be incompatibility between the version of the binaries you are using as follows:
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 9 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.