Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A general question. #404

Open
bubbsJanko opened this issue Nov 11, 2023 · 2 comments
Open

A general question. #404

bubbsJanko opened this issue Nov 11, 2023 · 2 comments

Comments

@bubbsJanko
Copy link

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
Copy link
Author

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

@owqejfb
Copy link

owqejfb commented Nov 12, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants