smiley/steamapi

Cannot import 'core'

peacefulotter opened this issue · 8 comments

Just downloaded this amazing API and it says that I can't import 'core'.
steamapi.core.APIConnection(api_key=STEAM_API_KEY, validate_key=True) AttributeError: module 'steamapi' has no attribute 'core'
I tried :
import steamapi from steamapi import * -- Nothing.
and when I do
from steamapi import core it says : ImportError: cannot import name 'core'

What should I do ? Thanks ^^

fixed the problem by doing from steamapi import steamapi since i have a file called steamapi in a file called steamapi
Hope you understand me (im french ^^)

That's odd, you should just have steamapi if you installed it with python setup.py develop/install like in the README. How did you add the package to your Python installation?

I know... but anyway, i fixed the problem :)
I installed the package with pip if I remember it correctly : python -m pip install steamapi

That's someone else's project, this one isn't on PyPI (yet).

So why do i have all the others functionnality of your api and when i do from steamapi import steamapiI can use your API without ani problem?

If it's the same interface, you may've just installed it weirdly. Do you still see the namespaces core, user, etc.? And classes like steamapi.core.APIConnection?

Yeaahh... I have everything : The first folder has the second steamapi folder, a readme file, requirements.txt, .git ... and the second (so the steamapi folder inside the steamapi folder) has __init__.py, app.py, consts.py core.py, decorators.py, errors.py, store.py and user.py Everything seems ok right?

But it seems obvious to have this 'issue' because i installed a steamapi module, so the name of the folder where the module is is called "steamapi", and then in this folder there is a steamapi folder like in your code and thats where the classes are.
Seems obvious to import steamapi from steamapi then .. /: