Issue in running Streamlit app in Anaconda environment

I am able to run “streamlit hello” and interact using chrome browser. But I get errors when I try to run “streamlit run https://raw.githubusercontent.com/streamlit/demo-self-driving/master/app.py” using Anaconda prompt (as administrator or standard user) having python 3.7 or 3.6. . Below is error log. Kindly suggest:

(base) C:\Users\<home>>streamlit run https://raw.githubusercontent.com/streamlit/demo-self-driving/master/app.py
Traceback (most recent call last):
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\runpy.py”, line 193, in _run_module_as_main
“__main__”, mod_spec)
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “C:\Users\<home>\AppData\Local\Continuum\anaconda3\Scripts\streamlit.exe\__main__.py”, line 9, in <module>
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\click\core.py”, line 764, in __call__
return self.main(*args, **kwargs)
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\click\core.py”, line 717, in main
rv = self.invoke(ctx)
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\click\core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\click\core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\click\core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\streamlit\cli.py”, line 149, in main_run
_main_run(fp.name, args)
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\streamlit\cli.py”, line 179, in _main_run
bootstrap.run(file, command_line, args)
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\streamlit\bootstrap.py”, line 181, in run
server.add_preheated_report_session()
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\streamlit\server\Server.py”, line 393, in add_preheated_report_session
session = self._add_browser_connection(PREHEATED_REPORT_SESSION)
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\streamlit\server\Server.py”, line 422, in _add_browser_connection
command_line=self._command_line,
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\streamlit\ReportSession.py”, line 96, in __init__
self._report, self._on_source_file_changed
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\streamlit\watcher\LocalSourcesWatcher.py”, line 87, in __init__
module_name=None, # Only the root script has None here.
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\streamlit\watcher\LocalSourcesWatcher.py”, line 110, in _register_watcher
watcher=FileWatcher(filepath, self.on_file_changed), module_name=module_name
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\streamlit\watcher\EventBasedFileWatcher.py”, line 86, in __init__
file_watcher.watch_file(file_path, on_file_changed)
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\streamlit\watcher\EventBasedFileWatcher.py”, line 160, in watch_file
folder_handler.add_file_change_listener(file_path, callback)
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\streamlit\watcher\EventBasedFileWatcher.py”, line 248, in add_file_change_listener
md5 = util.calc_md5_with_blocking_retries(file_path)
File “c:\users\<home>\appdata\local\continuum\anaconda3\lib\site-packages\streamlit\watcher\util.py”, line 63, in calc_md5_with_blocking_retries
with open(file_path, “rb”) as f:
PermissionError: [Errno 13] Permission denied: ‘C:\\Users\\<home>\\AppData\\Local\\Temp\\tmp3p_uuyyn’
1 Like

Hi @Kumarabhijit, I think you found a bug :smiley:

I wrote possible a fix right now, and in there I explain what could be going on, in case you’re interested.

But that fix should take a week or two to land. In the meantime, can you try doing the following?

  1. Download the file at https://raw.githubusercontent.com/streamlit/demo-self-driving/master/app.py
  2. Rename the file to something memorable, like demo-self-driving.py
  3. In the terminal, navigate to where the file is and call:
    streamlit run demo-self-driving.py
    

Thanks! I am able to launch it successfully and run demo.

1 Like