nba_api icon indicating copy to clipboard operation
nba_api copied to clipboard

A general question.

Open bubbsJanko opened this issue 1 year ago • 2 comments

I am sorry to be a bother but I use your project and it is very good so I figure you may be able to help me. It has to do with importing. For example, in this file https://github.com/swar/nba_api/blob/master/tests/unit/test_static_data.py you do from nba_api.stats.static import teams

I have a program with the same file structure as you. When I run from packageName.module import whatever I get module not found error. The thing is, when I build the same program in pycharm the import works perfectly, but in vscode it does not.

Let's say I have the following directory structure: parent_dir/ foo_dir/ foo.py bar_dir/ bar.py

I wanted to import bar.py from within foo.py, in pycharm I can with from parent_dir.bar_dir import bar but in vscode throws error. Same python installed I do not know what the problem can be something with my vscode configuration. If you can help me thanks.

bubbsJanko avatar Nov 11 '23 03:11 bubbsJanko

Does it have to do with someone you do with the python path?

bubbsJanko avatar Nov 11 '23 04:11 bubbsJanko

you say it works in pycharm but not vscode? are they both in the same directory when you open them? could also be something with your python path.

owqejfb avatar Nov 12 '23 20:11 owqejfb