unicode error
Checklist
- [x] I have searched the existing issues for similar issues.
- [x] I added a very descriptive title to this issue.
- [x] I have provided sufficient information below to help reproduce this issue.
Summary
windows10 pro, python13.2, streamlit 1.40, error while importing heyoo module like...
. . . there is no error if run with windows10 pro, python9/11, streamlit1.39/1.38
Reproducible Code Example
from heyoo import WhatsApp
Steps To Reproduce
No response
Expected Behavior
No response
Current Behavior
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 155-156: surrogates not allowed
Traceback:
File "C:\Users\niramay\PycharmProjects\clinic.venv\Lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 121, in exec_func_with_error_handling
result = func()
File "C:\Users\niramay\PycharmProjects\clinic.venv\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 591, in code_to_exec
exec(code, module.dict)
~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\niramay\PycharmProjects\clinic\pages\zPrescription.py", line 23, in
Is this a regression?
- [x] Yes, this used to work in a previous version.
Debug info
- Streamlit version:1.40
- Python version:13.2
- Operating System:windows10pro
- Browser:chrome latest
Additional Information
No response
If this issue affects you, please react with a 👍 (thumbs up emoji) to the initial post.
Your feedback helps us prioritize which bugs to investigate and address first.
Hi @madhukarjadhav736,
I've reproduced this issue and narrowed it down to python 3.13 with any version of Streamlit.
Are you able to use python 3.12.9 as a mitigation?
Laura
Yes, thank u for help!
On Tue, 25 Feb 2025, 23:27 Laura Wilby, @.***> wrote:
Hi @madhukarjadhav736 https://github.com/madhukarjadhav736,
I've reproduced this issue and narrowed it down to python 3.13 with any version of Streamlit.
Are you able to use python 3.12.9 as a mitigation?
Laura
— Reply to this email directly, view it on GitHub https://github.com/streamlit/streamlit/issues/10503#issuecomment-2682862433, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2C2ZYJPUZQDEQLQSZIJS532RSVITAVCNFSM6AAAAABXZ37VKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBSHA3DENBTGM . You are receiving this because you were mentioned.Message ID: @.***> [image: sfc-gh-lwilby]sfc-gh-lwilby left a comment (streamlit/streamlit#10503) https://github.com/streamlit/streamlit/issues/10503#issuecomment-2682862433
Hi @madhukarjadhav736 https://github.com/madhukarjadhav736,
I've reproduced this issue and narrowed it down to python 3.13 with any version of Streamlit.
Are you able to use python 3.12.9 as a mitigation?
Laura
— Reply to this email directly, view it on GitHub https://github.com/streamlit/streamlit/issues/10503#issuecomment-2682862433, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2C2ZYJPUZQDEQLQSZIJS532RSVITAVCNFSM6AAAAABXZ37VKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBSHA3DENBTGM . You are receiving this because you were mentioned.Message ID: @.***>
Anu update on this?
@madhukarjadhav736 when I looked into this in February, I found the error is because of this line in the docstring of the package you are using that has an emoji. If I remember correctly, there was a change in Python that makes this no longer work with the Streamlit script runner when we need to call exec on your script.
Do you know the maintainer of this library? We thought the simplest solution would be to remove that emoji.
Good, thanks , will try doing that.
On Sat, 30 Aug 2025, 10:51 am Laura Wilby, @.***> wrote:
sfc-gh-lwilby left a comment (streamlit/streamlit#10503) https://github.com/streamlit/streamlit/issues/10503#issuecomment-3238961941
@madhukarjadhav736 https://github.com/madhukarjadhav736 when I looked into this in February, I found the error is because of this line https://github.com/Neurotech-HQ/heyoo/blob/main/heyoo/__init__.py#L86 in the docstring of the package you are using that has an emoji. If I remember correctly, there was a change in Python that makes this no longer work with the Streamlit script runner when we need to call exec on your script.
Do you know the maintainer of this library? We thought the simplest solution would be to remove that emoji.
— Reply to this email directly, view it on GitHub https://github.com/streamlit/streamlit/issues/10503#issuecomment-3238961941, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2C2ZYI2ZYZQ6AFJ6DRX6CT3QEYHFAVCNFSM6AAAAABXZ37VKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEMZYHE3DCOJUGE . You are receiving this because you were mentioned.Message ID: @.***>