When "streamlit run" file doesn't exit and has no extension, error printout is weird
See original GitHub issue- Create a Python file and call it
example
(without .py) streamlit run example
Here’s what you get:
This error message is not a valid sentence: “Streamlit requires raw Python (.py) files, not .”
What’s happening is that the code is trying to write the file extension in the error message, but in this case the file has no extension.
We should instead say something like “Streamlit requires raw Python (.py) files, and the provided file has no extension.”
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (3 by maintainers)
Top Results From Across the Web
Cant launch my app - Using Streamlit
Hi I'm new to coding and have just read about stremlit which seems awesome, I have been able to launch the streamlit hello...
Read more >How do I get around the .py extension error? - Stack Overflow
I suggest you go to your cmd prompt then use cd until you get into the right directory then use streamlit run main.py....
Read more >How to Setup Your Python Environment for Machine Learning ...
This step assumes you have sufficient administrative privileges to install software on your system. 1. Double click the downloaded file. 2.
Read more >Display Troubleshooting — Altair 4.2.0 documentation
If you are expecting a chart output and see nothing at all, it means that the Javascript rendering libraries are not being invoked....
Read more >Python connection error - Casale Giacinta
In this case there is no need to close the DB connection. ... a connection object referring to the existing database or a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The problem is probably in the path if it has folder title with space. For example, if your path is: C:/User/My Folder/main.py and you try to run it as: streamlit run C:/User/My Folder/main.py you get this Error: Streamlit requires raw Python (.py) files (the problem is in “My Folder” title). Try to run it as: streamlit run “C:/User/My Folder/main.py” and the problem would be solved. Cheers
I can fix this problem. If approved, I will make a pull request.