Merged
Conversation
- Fix VerboseTB initialization with fallback approaches for IPython compatibility
- Add pyodide-http package to enable HTTPS support for requests library
- Document working HTTPS solution using requests + StringIO for pandas
Fixes:
1. VerboseTB 'mode' parameter error by trying different initialization approaches
2. HTTPS URLs now work with requests library (pandas.read_csv still needs workaround)
Working HTTPS pattern:
import requests, pandas as pd, io
response = requests.get('https://example.com/data.csv')
df = pd.read_csv(io.StringIO(response.text))
The requests library works with HTTPS out of the box via pyodide-http patching.
Remove comments that single out individual packages in the lists, making the code cleaner and more consistent.
Replace complex fallback logic with the exact pattern that works in our environment: - VerboseTB(color_scheme='Neutral') for initialization - format_exception(exc_value, exc_traceback) with only 2 args Tested and verified in our exact Pyodide/IPython environment.
Replace VerboseTB with standard traceback formatting to ensure correct exception type parsing. VerboseTB was causing all exceptions to be formatted as 'PythonError' instead of preserving the actual exception type like 'ValueError'. Now error outputs correctly show: ename: 'ValueError' (not 'PythonError') evalue: 'test error message' traceback: [proper traceback lines] Fixes test failure in real-execution.test.ts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slightly improve network needing code usage in the pyodide runtime.