httpimport
httpimport copied to clipboard
import public github
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.
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
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
I see. Give me some time and I'll return to that issue. Until then you can try importing every submodule one by one.
Hey, can you check if the problem is solved in v1.3.1?
Looks like it could be related to https://github.com/operatorequals/httpimport/issues/53