Cannot Execute from command

Answered

I run pycharm 2017.1.3 and Python 3.6.1

I have a test webapp that  I run from pycharm using flask 

If i select the code and right-click Execute in Console:

Traceback (most recent call last):
File "<input>", line 4, in <module>
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\flask\app.py", line 345, in __init__
root_path=root_path)
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\flask\helpers.py", line 843, in __init__
root_path = get_root_path(self.import_name)
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\flask\helpers.py", line 721, in get_root_path
'provided.' % import_name)
RuntimeError: No root path can be found for the provided module "builtins". This can happen because the module came from an import hook that does not provide file name information or because it's a namespace package. In this case the root path needs to be explicitly provided.

 

 

On the other hand if i click Run from IDE it works fine, why option 1 does not work?

0
1 comment

Hi Tcapacci! I created a ticket for this problem: PY-24578. Please feel free to vote & comment.

0

Please sign in to leave a comment.