import public github
priamai opened this issue · 4 comments
priamai commented
Hello,
I am not sure what I am doing wrong but this should work right?v
with httpimport.github_repo('priamai','stixorm',ref='master'):
import stixorm
from stixorm.module.typedb import TypeDBSink,TypeDBSource
I am getting an:
ImportError: cannot import name 'TypeDBSink' from 'stixorm.module.typedb' (https://raw.githubusercontent.com/priamai/stixorm/master/stixorm/module/typedb.py)
---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
operatorequals commented
In this case you are doing nothing wrong!
Just importing specific objects from a module is not supported.
Try using them with full names:
with httpimport.github_repo('priamai','stixorm',ref='master'):
# import the whole submodule
from stixorm.module import typedb
# Use here
typedb.TypeDBSink
typedb.TypeDBSource
priamai commented
Ops I see,
but I am running your code and getting this:
AttributeError: module 'stixorm.module.typedb' has no attribute 'TypeDBSink'
My version:
pip install httpimport==1.3.0
operatorequals commented
I see. Give me some time and I'll return to that issue. Until then you can try importing every submodule one by one.