-
Notifications
You must be signed in to change notification settings - Fork 44.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update web_selenium.py to use try-with for headers #2988
Conversation
This modification uses a with statement to open and read the file, which automatically closes the file after the block is executed. It also adds a try-except block to catch any errors when executing the script.
Please run "black ." and commit again |
Running the "black ." in the commands folder, to format the web_selenium.py file, did nothing successfully: "All done! ✨ 🍰 ✨ GPT-4 says: "In this specific case, the original code snippet is already formatted according to the "black" style guide, so there are no changes." Otherwise, this commit allows for the use of Weaviate properly and should be submitted 👍 |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #2988 +/- ##
==========================================
- Coverage 49.20% 40.64% -8.57%
==========================================
Files 63 63
Lines 3014 3019 +5
Branches 496 497 +1
==========================================
- Hits 1483 1227 -256
- Misses 1411 1720 +309
+ Partials 120 72 -48
... and 15 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
The issue is that there's an extra trailing newline at the end of the file. Just to be extra clear: there should be only one trailing newline, and your problem is that you have two. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #2988 +/- ##
==========================================
- Coverage 60.26% 60.26% -0.01%
==========================================
Files 69 69
Lines 3143 3148 +5
Branches 525 526 +1
==========================================
+ Hits 1894 1897 +3
- Misses 1116 1118 +2
Partials 133 133
☔ View full report in Codecov by Sentry. |
This modification uses a with statement to open and read the file, which automatically closes the file after the block is executed. It also adds a try-except block to catch any errors when executing the script.
Background
I am running MacOS and switched between Local and WeaviateMemory to understand the pros and cons of vector-based storage. During this, Weaviate stopped working and would return errors related to a wrong name for calling Auto-Gpt.JSON. The error was related to how Weaviate must receive file names
raise UnexpectedStatusCodeException("Create class", response) weaviate.exceptions.UnexpectedStatusCodeException: Create class! Unexpected status code: 422, with response body: {'error': [{'message': "'Auto-gpt' is not a valid class name"}]}.
Changes
I had a conversation with Auto-GPT about the issue and was walked through finding the offending file, and applying the correct changes
Documentation
GPT: it seems like there's an issue in the add_header function when it executes the overlay.js script.
To fix this issue, let's modify the add_header function in web_selenium.py
Test Plan
PR Quality Checklist