pycharm

ModuleNotFoundError when running script from Terminal

北战南征 提交于 2021-02-06 15:09:20
问题 I have the following folder structure: app __init__.py utils __init__.py transform.py products __init__.py fish.py In fish.py I'm importing transform as following: import utils.transform . When I'm running fish.py from Pycharm, it works perfectly fine. However when I am running fish.py from the Terminal, I am getting error ModuleNotFoundError: No module named 'utils' . Command I use in Terminal: from app folder python products/fish.py . I've already looked into the solutions suggested here:

ModuleNotFoundError when running script from Terminal

余生长醉 提交于 2021-02-06 15:09:09
问题 I have the following folder structure: app __init__.py utils __init__.py transform.py products __init__.py fish.py In fish.py I'm importing transform as following: import utils.transform . When I'm running fish.py from Pycharm, it works perfectly fine. However when I am running fish.py from the Terminal, I am getting error ModuleNotFoundError: No module named 'utils' . Command I use in Terminal: from app folder python products/fish.py . I've already looked into the solutions suggested here:

ModuleNotFoundError when running script from Terminal

寵の児 提交于 2021-02-06 15:09:06
问题 I have the following folder structure: app __init__.py utils __init__.py transform.py products __init__.py fish.py In fish.py I'm importing transform as following: import utils.transform . When I'm running fish.py from Pycharm, it works perfectly fine. However when I am running fish.py from the Terminal, I am getting error ModuleNotFoundError: No module named 'utils' . Command I use in Terminal: from app folder python products/fish.py . I've already looked into the solutions suggested here:

using jupyter notebook in pycharm - no such notebook dir

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-06 11:36:53
问题 I'm trying to use jupyter notebook from PyCharm 2016.1. I open a previously created iPython notebook, click in a cell with code, and run it. I get prompted to start jupyter notebook at the default url and click OK. Here are the error messages from the Run window: [C 13:04:23.979 NotebookApp] Bad config encountered during initialization: The Jupyter HTML Notebook. [C 13:04:23.979 NotebookApp] No such notebook dir: 'C:\\Users\\cb4\\Documents\\python' iPython Notebook is enabled in PyCharm with

using jupyter notebook in pycharm - no such notebook dir

拟墨画扇 提交于 2021-02-06 11:35:37
问题 I'm trying to use jupyter notebook from PyCharm 2016.1. I open a previously created iPython notebook, click in a cell with code, and run it. I get prompted to start jupyter notebook at the default url and click OK. Here are the error messages from the Run window: [C 13:04:23.979 NotebookApp] Bad config encountered during initialization: The Jupyter HTML Notebook. [C 13:04:23.979 NotebookApp] No such notebook dir: 'C:\\Users\\cb4\\Documents\\python' iPython Notebook is enabled in PyCharm with

How do I get PyCharm to show entire error diffs from pytest?

ⅰ亾dé卋堺 提交于 2021-02-06 09:42:05
问题 I am using Pycharm to run my pytest unit tests. I am testing a REST API, so I often have to validate blocks of JSON. When a test fails, I'll see something like this: FAILED test_document_api.py:0 (test_create_documents) {'items': [{'i...ages': 1, ...} != {'items': [{'...ages': 1, ...} Expected :{'items': [{'...ages': 1, ...} Actual :{'items': [{'i...ages': 1, ...} <Click to see difference> When I click on the "Click to see difference" link, most of the difference is converted to points of

Pycharm gets error “can't find '__main__' module”

落花浮王杯 提交于 2021-02-05 20:27:50
问题 Whenever I try to run script via Virtualenv in pycharm, i get this error: C:\Users\Costello\PycharmProjects\test\venv\Scripts\python.exe C:/Users/Costello/PycharmProjects/test C:\Users\Costello\PycharmProjects\test\venv\Scripts\python.exe: can't find '__main__' module in 'C:/Users/Costello/PycharmProjects/test' Everything works fine via idle, or vs code. I figure it must be something with a way that I have setup my pycharm but have no idea what. edit: this happens whatever I run, even simple

Pycharm gets error “can't find '__main__' module”

故事扮演 提交于 2021-02-05 20:27:28
问题 Whenever I try to run script via Virtualenv in pycharm, i get this error: C:\Users\Costello\PycharmProjects\test\venv\Scripts\python.exe C:/Users/Costello/PycharmProjects/test C:\Users\Costello\PycharmProjects\test\venv\Scripts\python.exe: can't find '__main__' module in 'C:/Users/Costello/PycharmProjects/test' Everything works fine via idle, or vs code. I figure it must be something with a way that I have setup my pycharm but have no idea what. edit: this happens whatever I run, even simple

Pycharm gets error “can't find '__main__' module”

为君一笑 提交于 2021-02-05 20:26:59
问题 Whenever I try to run script via Virtualenv in pycharm, i get this error: C:\Users\Costello\PycharmProjects\test\venv\Scripts\python.exe C:/Users/Costello/PycharmProjects/test C:\Users\Costello\PycharmProjects\test\venv\Scripts\python.exe: can't find '__main__' module in 'C:/Users/Costello/PycharmProjects/test' Everything works fine via idle, or vs code. I figure it must be something with a way that I have setup my pycharm but have no idea what. edit: this happens whatever I run, even simple

Pycharm gets error “can't find '__main__' module”

自作多情 提交于 2021-02-05 20:26:50
问题 Whenever I try to run script via Virtualenv in pycharm, i get this error: C:\Users\Costello\PycharmProjects\test\venv\Scripts\python.exe C:/Users/Costello/PycharmProjects/test C:\Users\Costello\PycharmProjects\test\venv\Scripts\python.exe: can't find '__main__' module in 'C:/Users/Costello/PycharmProjects/test' Everything works fine via idle, or vs code. I figure it must be something with a way that I have setup my pycharm but have no idea what. edit: this happens whatever I run, even simple