importing session
bendichter opened this issue · 2 comments
bendichter commented
Using the latest master for this repo:
from element_session.session import Session
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
/tmp/ipykernel_794/2689618127.py in <module>
----> 1 from element_session.session import Session
ModuleNotFoundError: No module named 'element_session.session'
It looks like this was changed 7 days ago, with this commit. I'm not really sure what issue that fix was addressing, but this import was working for me before and now it's not. This does work, however:
from element_session.session_with_datetime import Session
kabilar commented
Thanks @bendichter. Ah yes, this update was introduced in #12 and further details can be found in this comment.
Your solution works. As the init.py ensures that the session_with_datetime
module is default, you could also use the following:
from element_session import session
session.Session()
If a user wanted to use the session schema with an integer value as the primary attribute (instead of a datetime):
from element_session import session_with_id as session
session.Session()
bendichter commented
@kabilar ok, if that is the intended behavior I am happy to make the appropriate changes in my PRs