Notable Changes
-
Favicon defaults to a PNG to allow for transparency (#4272).
-
Select Slider Widget now has the
disabled
parameter that removes interactivity (completing all of our widgets) (#4314).
Other Changes
Notable Changes
disabled
parameter that removes interactivity (completing all of our widgets) (#4314).Other Changes
Great work
Just curious why st.image didn’t get the disabled parameter? That’s actually one I expected to have the “view fullscreen image” either enabled or disabled
I sometimes accidentally click an image while scrolling on touchpad which takes me to the full screen image so would love to have that functionality be a choice
Also noticed some weird behaviour with small images in columns like with this little cryptocurrency dashboard I’ve built for my friends:
The “view fullscreen” toggle pops up on top of my BTC image when I hover over the yellow BNB image making the BTC image not visible anymore:
When the yellow BNB image is clicked it shows the little image all the way on the left while the close fullscreen button is all the way top-right and easy to miss:
I’ve closed this fullscreen page with the ctrl+w hotkey a little more than I’d like to admit thinking the image popped up in a new browser tab because I didn’t immediately see the close fullscreen button which meant I closed the entire page of the streamlit app
I’d love to be able to disable the view fullscreen ability of images because of this.
I found after updated to 1.5.0, some css set through mardown is disappear and got AttributeError
I return back to version 1.2.0, css effect is back and AttributeError is disappear.
In the process, program code has no change.
Hey @BeyondMyself ! Any chance you can provide the culprit code sample. Would love to investigate what’s causing the encode error.
I will make sure disabling full screen gets a look at for the future. We targeted widgets which, when changed, causes a rerun. We wanted to disable that.
Actually, it report AttributeError, like this, in 1.2.0, it does not have this error:
I checked the error content, it maybe occured at this line:
st.set_page_config(page_title='切片PRB计算工具', page_icon='PRB.ico', layout='wide', initial_sidebar_state='auto')
Dose 1.5.0 not support ico format file as page_icon?
AttributeError: ‘NoneType’ object has no attribute ‘encode’
Traceback:
File "c:\python38\lib\site-packages\streamlit\script_runner.py", line 379, in _run_script
exec(code, module.__dict__)File "G:\mypath\Python\prb.py", line 30, in <module>
st.set_page_config(page_title='切片PRB计算工具', page_icon='PRB.ico', layout='wide', initial_sidebar_state='auto')File "c:\python38\lib\site-packages\streamlit\commands\page_config.py", line 102, in set_page_config
msg.page_config_changed.favicon = image.image_to_url(File "c:\python38\lib\site-packages\streamlit\elements\image.py", line 300, in image_to_url
this_file = in_memory_file_manager.add(data, mimetype, image_id)File "c:\python38\lib\site-packages\streamlit\in_memory_file_manager.py", line 261, in add
file_id = _calculate_file_id(content, mimetype, file_name=file_name)File "c:\python38\lib\site-packages\streamlit\in_memory_file_manager.py", line 72, in _calculate_file_id
filehash.update(bytes(mimetype.encode()))
AttributeError: ‘NoneType’ object has no attribute ‘encode’
Traceback:
File "c:\python38\lib\site-packages\streamlit\script_runner.py", line 379, in _run_script
exec(code, module.__dict__)File "G:\mypath\Python\smarthippo.py", line 12, in <module>
st.set_page_config(page_title="Smart Hippo使用情况登记", page_icon="globe.ico", layout='wide',File "c:\python38\lib\site-packages\streamlit\commands\page_config.py", line 102, in set_page_config
msg.page_config_changed.favicon = image.image_to_url(File "c:\python38\lib\site-packages\streamlit\elements\image.py", line 300, in image_to_url
this_file = in_memory_file_manager.add(data, mimetype, image_id)File "c:\python38\lib\site-packages\streamlit\in_memory_file_manager.py", line 261, in add
file_id = _calculate_file_id(content, mimetype, file_name=file_name)File "c:\python38\lib\site-packages\streamlit\in_memory_file_manager.py", line 72, in _calculate_file_id
filehash.update(bytes(mimetype.encode()))
According to our docs, our page icons just need to be supported by st.image
. Would st.image('PRB.ico')
work? You said you also downgraded to 1.2.0. It works for that use case? If you test 1.3.1 and 1.4.0, we can determine what change might have broken it.
I tried 1.2.0, 1.3.0, 1.4.0, page_icon=“globe.ico” can run normally, after upgrade to 1.5.0,
AttributeError: ‘NoneType’ object has no attribute ‘encode’ occurs.
1.5.0 supports emoji as page_icon well.
Adding -m streamlit.cli run in run config (pycharm) results in the following error:
Traceback (most recent call last):
File “/miniforge3/envs/py39/lib/python3.9/runpy.py”, line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/miniforge3/envs/py39/lib/python3.9/runpy.py”, line 87, in _run_code
exec(code, run_globals)
File “/miniforge3/envs/py39/lib/python3.9/site-packages/streamlit/cli.py”, line 301, in
main()
File “/miniforge3/envs/py39/lib/python3.9/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/miniforge3/envs/py39/lib/python3.9/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/miniforge3/envs/py39/lib/python3.9/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/miniforge3/envs/py39/lib/python3.9/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/miniforge3/envs/py39/lib/python3.9/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/miniforge3/envs/py39/lib/python3.9/site-packages/streamlit/cli.py”, line 202, in main_run
_main_run(target, args, flag_options=kwargs)
File “/miniforge3/envs/py39/lib/python3.9/site-packages/streamlit/cli.py”, line 228, in _main_run
command_line = _get_command_line_as_string()
File “/miniforge3/envs/py39/lib/python3.9/site-packages/streamlit/cli.py”, line 214, in _get_command_line_as_string
assert parent.command_path == “streamlit”
AssertionError
Process finished with exit code 1
Works perfectly again when downgrading to 1.4.0
Hey @flight505 - if you’re launching Streamlit from PyCharm, the “supported” way to do it is to set up your Run/Debug Configuration like so:
For example, here’s how I launch a Streamlit app called “streamlit_app.py”, which lives in my “/Users/tim/export/corp-streamlit” directory:
(If you’re on Mac or Linux, a quick way to get the path of your environment’s streamlit
script is to do $ which streamlit
from a terminal that you’ve activated the venv within.)
Thanks @tim, this works, but in my opinion is somewhat inconvenient.
That’s because it creates a separate run/debug configuration that PyCharm does not associate with the relevant script (in your example streamlit_app.py
). Thus, when right-clicking streamlit_app.py
in PyCharm’s file explorer the run/debug options there do not invoke streamlit correctly.
I can get around this by starting streamlit from within Python, via the bootstrap hack, although I understand that this not supported and has some issues.
Overall, I think it would be great if there was an official way of invoking streamlit from within python.
Thank you for caring about the expanders. Feeling > functionality. A software won’t make it, no matter the features, if it just feels broken from the start. Looking into expander state is showing me you definitely know what’s important
This has been bugging me for so long. Thank you so much for your work
Hey @BeyondMyself Sorry for the delay, but we have tested this out, and we see the issue. We’ve fixed the issue and just released it in our patch release (1.5.1) Thank you very much for letting us know and catching this!
Thank you. problem is solved in 1.5.1.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.