question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When "streamlit run" file doesn't exit and has no extension, error printout is weird

See original GitHub issue
  1. Create a Python file and call it example (without .py)
  2. 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:closed
  • Created 3 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

44reactions
aleksandar-anastasovcommented, Aug 29, 2021

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

6reactions
abhinand5commented, Oct 7, 2020

I can fix this problem. If approved, I will make a pull request.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found