issue while importing the library
Hello,
I have followed the isntallation istructions for the installing the project and it's dependencies but when I import the following : from imageai.Detection.Custom import DetectionModelTrainer
I get the following error:
Traceback (most recent call last):
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3326, in run_code
code = compile('last_expr', 'fake', "single")
File "
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2040, in showtraceback try: AttributeError: 'ImportError' object has no attribute 'render_traceback'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py", line 1101, in get_records
# Get (safely) a string form of the exception info
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py", line 319, in wrapped
return f(*args, **kwargs)
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py", line 353, in fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\inspect.py", line 1502, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\inspect.py", line 1460, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), 'loader', None) is not None:
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\inspect.py", line 733, in getmodule
if ismodule(module) and hasattr(module, 'file'):
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow_init.py", line 50, in getattr
module = self.load()
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow_init.py", line 44, in _load
module = importlib.import_module(self.name)
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3326, in run_code
code = compile('last_expr', 'fake', "single")
File "
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2040, in showtraceback try: AttributeError: 'ImportError' object has no attribute 'render_traceback'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3249, in run_ast_nodes elif mode == 'single': File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3343, in run_code result.error_in_exec = value File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2043, in showtraceback # in the engines. This should return a list of strings. File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py", line 1385, in structured_traceback out=None, tb_offset=None): File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py", line 1288, in structured_traceback File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py", line 1150, in structured_traceback # (5 blanks lines) where none should be returned. TypeError: can only concatenate str (not "list") to str
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2040, in showtraceback try: AttributeError: 'TypeError' object has no attribute 'render_traceback'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py", line 1101, in get_records
# Get (safely) a string form of the exception info
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py", line 319, in wrapped
return f(*args, **kwargs)
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py", line 353, in fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\inspect.py", line 1502, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\inspect.py", line 1460, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), 'loader', None) is not None:
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\inspect.py", line 733, in getmodule
if ismodule(module) and hasattr(module, 'file'):
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow_init.py", line 50, in getattr
module = self.load()
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow_init.py", line 44, in _load
module = importlib.import_module(self.name)
File "C:\Users\charikleia.bitsakou\AppData\Local\Continuum\anaconda3\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.keras'
ImportError Traceback (most recent call last)
~\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py in
~\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py in
~\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py in swig_import_helper() 23 try: ---> 24 _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) 25 finally:
~\AppData\Local\Continuum\anaconda3\lib\imp.py in load_module(name, file, filename, details) 241 else: --> 242 return load_dynamic(name, filename, file) 243 elif type_ == PKG_DIRECTORY:
~\AppData\Local\Continuum\anaconda3\lib\imp.py in load_dynamic(name, path, file) 341 name=name, loader=loader, origin=path) --> 342 return _load(spec) 343
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last) ~\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py in showtraceback(self, exc_tuple, filename, tb_offset, exception_only, running_compiled_code) 2039 else: -> 2040 try: 2041 # Exception classes can customise their traceback - we
AttributeError: 'ImportError' object has no attribute 'render_traceback'
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last) ~\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py in run_code(self, code_obj, result, async_) 3341 etype, value, tb = sys.exc_info() 3342 if result is not None: -> 3343 result.error_in_exec = value 3344 self.CustomTB(etype, value, tb) 3345 except:
~\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py in showtraceback(self, exc_tuple, filename, tb_offset, exception_only, running_compiled_code) 2041 # Exception classes can customise their traceback - we 2042 # use this in IPython.parallel for exceptions occurring -> 2043 # in the engines. This should return a list of strings. 2044 stb = value.render_traceback() 2045 except Exception:
~\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py in structured_traceback(self, etype, value, tb, tb_offset, number_of_lines_of_context) 1383 1384 def call(self, etype=None, evalue=None, etb=None, -> 1385 out=None, tb_offset=None): 1386 """Print out a formatted exception traceback. 1387
~\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py in structured_traceback(self, etype, value, tb, tb_offset, number_of_lines_of_context) 1286 occurs with python programs that themselves execute other python code, 1287 like Python shells). """ -> 1288 1289 def init(self, mode='Plain', color_scheme='Linux', call_pdb=False, 1290 ostream=None,
~\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\ultratb.py in structured_traceback(self, etype, evalue, etb, tb_offset, number_of_lines_of_context) 1148 # Try the default getinnerframes and Alex's: Alex's fixes some 1149 # problems, but it generates empty tracebacks for console errors -> 1150 # (5 blanks lines) where none should be returned. 1151 return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset) 1152 except UnicodeDecodeError:
TypeError: can only concatenate str (not "list") to str
could you please let me know how I could fix it??
+1