-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix db handler #13
Merged
Merged
Fix db handler #13
Conversation
This file contains 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
Assistant generated file changes: - database.py: Fix cursor error handling --- User prompt: error: UnboundLocalError: cannot access local variable 'cur' where it is not associated with a value Traceback: File "/home/runner/03b7bb86-8a74-463e-966e-bafe8cfb3d67/.pythonlibs/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling result = func() ^^^^^^ File "/home/runner/03b7bb86-8a74-463e-966e-bafe8cfb3d67/.pythonlibs/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec exec(code, module.__dict__) File "/home/runner/03b7bb86-8a74-463e-966e-bafe8cfb3d67/main.py", line 132, in <module> init_db() File "/home/runner/03b7bb86-8a74-463e-966e-bafe8cfb3d67/database.py", line 29, in init_db cur.close()
Assistant generated file changes: - attached_assets/favicon.png: Add favicon image - main.py: Update page icon and title, Update title display --- User prompt: change the image and favicon to use this instead of the existing emoji
… error Assistant generated file changes: - main.py: Remove problematic image display, Update page icon to emoji --- User prompt: error: PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7fb3a6e11d50> Traceback: File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling result = func() ^^^^^^ File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec exec(code, module.__dict__) File "/home/runner/strExitCard/main.py", line 134, in <module> main() File "/home/runner/strExitCard/main.py", line 85, in main st.image("attached_assets/favicon.png", width=50) File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/runtime/metrics_util.py", line 409, in wrapped_func result = non_optional_func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/elements/image.py", line 172, in image marshall_images( File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/elements/lib/image_utils.py", line 438, in marshall_images proto_img.url = image_to_url( ^^^^^^^^^^^^^ File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/elements/lib/image_utils.py", line 332, in image_to_url image_format = _validate_image_format_string(image_data, output_format) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/elements/lib/image_utils.py", line 111, in _validate_image_format_string pil_image = Image.open(io.BytesIO(image_data)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Assistant generated file changes: - main.py: Add image icon next to title --- User prompt: use the image as the icon beside st.title as well
Assistant generated file changes: - main.py: Update image path to use mark_green.png, Update page icon --- User prompt: error PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7f4282141670> Traceback: File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling result = func() ^^^^^^ File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec exec(code, module.__dict__) File "/home/runner/strExitCard/main.py", line 137, in <module> main() File "/home/runner/strExitCard/main.py", line 87, in main st.image("attached_assets/favicon.png", width=50) File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/runtime/metrics_util.py", line 409, in wrapped_func result = non_optional_func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/elements/image.py", line 172, in image marshall_images( File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/elements/lib/image_utils.py", line 438, in marshall_images proto_img.url = image_to_url( ^^^^^^^^^^^^^ File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/elements/lib/image_utils.py", line 332, in image_to_url image_format = _validate_image_format_string(image_data, output_format) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/elements/lib/image_utils.py", line 111, in _validate_image_format_string pil_image = Image.open(io.BytesIO(image_data)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Assistant generated file changes: - main.py: Adjust image and title layout --- User prompt: is it possible to have the image in the same line as "situate learning"?
Assistant generated file changes: - main.py: Update app title and input descriptions, Update page title --- User prompt: let's change the copywriting title: "Stretch learning!" remove "what did you teach today" change "enter today's lesson or topic" to "enter a concept you plan to teach to generate open-ended and interdisciplinary questions to stretch learning
Assistant generated file changes: - .replit: Update deployment configuration - .streamlit/config.toml: Add base path configuration --- User prompt: instead of qnsprompt, use the site chergpt.sg/situatelearning
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.
No description provided.