I run pip install streamlit and succesfully install streamlit.
However, when I run streamlit hello or streamlit run app.py where app.py is a python app where I import streamlit, I get the following error.
$ streamlit hello
Traceback (most recent call last):
File "c:\program files (x86)\python37-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\program files (x86)\python37-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files (x86)\Python37-32\Scripts\streamlit.exe\__main__.py", line 7, in <module>
File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\program files (x86)\python37-32\lib\site-packages\streamlit\cli.py", line 192, in main_hello
_main_run(filename)
File "c:\program files (x86)\python37-32\lib\site-packages\streamlit\cli.py", line 251, in _main_run
bootstrap.run(file, command_line, args)
File "c:\program files (x86)\python37-32\lib\site-packages\streamlit\bootstrap.py", line 221, in run
server.start(_on_server_start)
File "c:\program files (x86)\python37-32\lib\site-packages\streamlit\server\Server.py", line 213, in start
start_listening(app)
File "c:\program files (x86)\python37-32\lib\site-packages\streamlit\server\Server.py", line 122, in start_listening
app.listen(port)
File "c:\program files (x86)\python37-32\lib\site-packages\tornado\web.py", line 2042, in listen
server.listen(port, address)
File "c:\program files (x86)\python37-32\lib\site-packages\tornado\tcpserver.py", line 143, in listen
sockets = bind_sockets(port, address=address)
File "c:\program files (x86)\python37-32\lib\site-packages\tornado\netutil.py", line 168, in bind_sockets
sock.bind(sockaddr)
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
I have tried to disable firewall but still got the error persists. I have also tried running streamlit run app.py --browser.serverPort 3000 and still got the same error.
I think the option is not --browser.serverPort but --server.port:
streamlit run your_script.py --server.port 3000
Related
C:\Users\Home\Desktop\CSS3\harward\files\src2\variables0>flask run
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
Traceback (most recent call last):
File "c:\program files\python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,`enter code here`
File "c:\program files\python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Program Files\Python38\Scripts\flask.exe\__main__.py", line 9, in <module>
File "c:\program files\python38\lib\site-packages\flask\cli.py", line 967, in main
cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
File "c:\program files\python38\lib\site-packages\flask\cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "c:\program files\python38\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "c:\program files\python38\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\program files\python38\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\program files\python38\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\program files\python38\lib\site-packages\click\decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "c:\program files\python38\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\program files\python38\lib\site-packages\flask\cli.py", line 852, in run_command
run_simple(
File "c:\program files\python38\lib\site-packages\werkzeug\serving.py", line 1052, in run_simple
inner()
File "c:\program files\python38\lib\site-packages\werkzeug\serving.py", line 996, in inner
srv = make_server(
File "c:\program files\python38\lib\site-packages\werkzeug\serving.py", line 847, in make_server
return ThreadedWSGIServer(
File "c:\program files\python38\lib\site-packages\werkzeug\serving.py", line 740, in __init__
HTTPServer.__init__(self, server_address, handler)
File "c:\program files\python38\lib\socketserver.py", line 452, in __init__
self.server_bind()
File "c:\program files\python38\lib\http\server.py", line 138, in server_bind
socketserver.TCPServer.server_bind(self)
File "c:\program files\python38\lib\socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
I faced this issue in the virtual environment, so this is what I did:
I deactivated virtualenv and installed flask there
I activated the virtualenv and installed flask again and it worked.
I faced this on windows10
I am getting the following error message when trying mlflow examples and running 'mlflow ui'.
Error:
ModuleNotFoundError: No module named 'fcntl' Running the mlflow server
failed. Please see the logs above for details
Is anyone aware of a solution to this issue?
I have tried the solutions suggested at https://github.com/mlflow/mlflow/pull/1080
without success. Replacing the modified files in mlflow source code, it raises other issues for not finding what it is looking for with the following:
Traceback (most recent call last):
File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\ProgramData\Anaconda3\envs\thesis_mlflow\Scripts\mlflow.exe\__main__.py", line 9, in <module>
File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\mlflow\cli.py", line 198, in ui
_run_server(backend_store_uri, default_artifact_root, "127.0.0.1", port, None, 1)
File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\mlflow\server\__init__.py", line 90, in _run_server
exec_cmd(full_command, env=env_map, stream_output=True)
File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\site-packages\mlflow\utils\process.py", line 34, in exec_cmd
stdin=subprocess.PIPE, **kwargs)
File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "c:\programdata\anaconda3\envs\thesis_mlflow\lib\subprocess.py", line 1017, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Just solved the issue: for some reason, waitress was not installed in the running environment. After installing it, everything seems working fine with the solution #1080 linked above in the question.
Perform the following installation before executing the mlflow ui command:
pip install waitress
pipenv install gives me an error on Windows 10 on empty folder:
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Scripts\pipenv.exe\__main__.py", line 9, in <module>
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\vendor\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\vendor\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\vendor\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\vendor\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\cli.py", line 366, in install
selective_upgrade=selective_upgrade,
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\core.py", line 1730, in do_install
skip_requirements=skip_requirements,
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\core.py", line 604, in ensure_project
three=three, python=python, site_packages=site_packages
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\core.py", line 537, in ensure_virtualenv
if not project.virtualenv_exists:
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\project.py", line 207, in virtualenv_exists
if self.pipfile_exists and os.path.exists(self.virtualenv_location):
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\project.py", line 299, in virtualenv_location
loc = self._get_virtualenv_location(self.virtualenv_name)
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\project.py", line 279, in virtualenv_name
sanitized, encoded_hash = self._get_virtualenv_hash(self.name)
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\project.py", line 267, in _get_virtualenv_hash
if not (env[-9] != '-' and
IndexError: string index out of range
It only works if I activate a virtual env before running the command.
I tried on macOS the same procedure and I don't have this problem.
I followed the installation instructions.
What can I do to make it work?
I'm new to python and I have just started web development. In the tutorial there is a page where I print out "hello world" using windows powershell. [But I have been keep getting this message and cannot access to local host :( please help me)
[error notice][1]
PS C:\Users\Administrator> python ‘C:\Program Files (x86)\Google\google_appengine\dev_appserver.py’ \Downloads\helloworld
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 83, in <module>
_run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 79, in _run_file
execfile(_PATHS.script_file(script_name), globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 1040, in <module>
main()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 1033, in main
dev_server.start(options)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 758, in start
options.config_paths, options.app_id)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\application_configuration.py", line 831, in __init__
module_configuration = ModuleConfiguration(config_path, app_id)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\application_configuration.py", line 127, in __init__
self._config_path)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\application_configuration.py", line 423, in _parse_configuration
with open(configuration_path) as f:
IOError: [Errno 2] No such file or directory: '\\Downloads\\helloworld'
PS C:\Users\Administrator>
IOError: [Errno 2] No such file or directory: '\Downloads\helloworld'
1) \Downloads\helloworld folder exists?
2) are you using good path to folder?
I'm trying to install the purchase app module from OpenErp with a different folder name, in order to edit code views as a different app and not modifying the existing one.
Client Traceback (most recent call last):
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\openerp\addons\web\http.py", line 203, in dispatch
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\openerp\addons\web\controllers\main.py", line 1133, in call_button
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\openerp\addons\web\controllers\main.py", line 1121, in _call_kw
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\openerp\addons\web\session.py", line 43, in proxy
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\openerp\addons\web\session.py", line 31, in proxy_method
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\openerp\addons\web\session.py", line 104, in send
Server Traceback (most recent call last):
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\openerp\addons\web\session.py", line 90, in send
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\netsvc.py", line 293, in dispatch_rpc
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\service\web_services.py", line 626, in dispatch
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\osv\osv.py", line 188, in execute_kw
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\osv\osv.py", line 131, in wrapper
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\osv\osv.py", line 197, in execute
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\osv\osv.py", line 185, in execute_cr
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\openerp\addons\base\module\module.py", line 424, in button_immediate_install
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\openerp\addons\base\module\module.py", line 475, in _button_immediate_function
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\pooler.py", line 39, in restart_pool
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\modules\registry.py", line 218, in new
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\modules\loading.py", line 348, in load_modules
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\modules\loading.py", line 259, in load_marked_modules
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\modules\loading.py", line 162, in load_module_graph
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\modules\module.py", line 405, in load_openerp_module
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\modules\module.py", line 133, in load_module
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\openerp\addons\compra\__init__.py", line 26, in <module>
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\openerp\addons\compra\report\__init__.py", line 22, in <module>
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\openerp\addons\compra\report\order.py", line 32, in <module>
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\report\report_sxw.py", line 392, in __init__
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\report\interface.py", line 65, in __init__
File "C:\Program Files\OpenERP 7.0-20130321-002353\Server\server\.\openerp\report\interface.py", line 45, in __init__
AssertionError: The report "report.purchase.order" already exists!
It throws me this error, could it be it's not possible to just change folder name and create new database without the existing purchase app installed to install it as another one?
This is not the good way of customization. If you do so OpenERP will give you error about report already exists. You should make your own module for customization.
If you really don't want to make your own module then either you should remove remove all the reports or you should change the name of report in py and xml as well.
This will resolve your error.
Thank you.