why it can't import trace in python - python

I have the following error, and I am new to data science and python
I am using python, keras, tensorflow
from tensorflow.python.profiler import trace
ImportError: cannot import name 'trace'
Full error report
Training network heads
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\keras\callbacks\tensorboard_v1.py", line 96, in __init__
from tensorflow.contrib.tensorboard.plugins import projector
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\contrib\__init__.py", line 39, in <module>
from tensorflow.contrib import compiler
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\contrib\compiler\__init__.py", line 21, in <module>
from tensorflow.contrib.compiler import jit
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\contrib\compiler\__init__.py", line 22, in <module>
from tensorflow.contrib.compiler import xla
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\contrib\compiler\xla.py", line 22, in <module>
from tensorflow.python.estimator import model_fn as model_fn_lib
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\python\estimator\model_fn.py", line 26, in <module>
from tensorflow_estimator.python.estimator import model_fn
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\__init__.py", line 10, in <module>
from tensorflow_estimator._api.v1 import estimator
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\_api\v1\estimator\__init__.py", line 10, in <module>
from tensorflow_estimator._api.v1.estimator import experimental
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\_api\v1\estimator\experimental\__init__.py", line 10, in <module>
from tensorflow_estimator.python.estimator.canned.dnn import dnn_logit_fn_builder
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\python\estimator\canned\dnn.py", line 27, in <module>
from tensorflow_estimator.python.estimator import estimator
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 36, in <module>
from tensorflow.python.profiler import trace
ImportError: cannot import name 'trace'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 3343, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-6-712e23ddfaeb>", line 8, in <module>
layers='heads')
File "F:\Khalid\Documents\miniconda3\envs\crowdai-mapping-challenge-mask-rcnn-master\crowdai-mapping-challenge-mask-rcnn-master\mrcnn\model.py", line 2287, in train
histogram_freq=0, write_graph=True, write_images=False),
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\keras\callbacks\tensorboard_v1.py", line 98, in __init__
raise ImportError('You need the TensorFlow (v1) module installed to '
ImportError: You need the TensorFlow (v1) module installed to use TensorBoard.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'ImportError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1169, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 316, in wrapped
return f(*args, **kwargs)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 350, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\inspect.py", line 1490, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\inspect.py", line 1448, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), '__loader__', None) is not None:
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\inspect.py", line 733, in getmodule
if ismodule(module) and hasattr(module, '__file__'):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.estimator'
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\keras\callbacks\tensorboard_v1.py", line 96, in __init__
from tensorflow.contrib.tensorboard.plugins import projector
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\contrib\__init__.py", line 39, in <module>
from tensorflow.contrib import compiler
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\contrib\compiler\__init__.py", line 21, in <module>
from tensorflow.contrib.compiler import jit
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\contrib\compiler\__init__.py", line 22, in <module>
from tensorflow.contrib.compiler import xla
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\contrib\compiler\xla.py", line 22, in <module>
from tensorflow.python.estimator import model_fn as model_fn_lib
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\python\estimator\model_fn.py", line 26, in <module>
from tensorflow_estimator.python.estimator import model_fn
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\__init__.py", line 10, in <module>
from tensorflow_estimator._api.v1 import estimator
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\_api\v1\estimator\__init__.py", line 10, in <module>
from tensorflow_estimator._api.v1.estimator import experimental
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\_api\v1\estimator\experimental\__init__.py", line 10, in <module>
from tensorflow_estimator.python.estimator.canned.dnn import dnn_logit_fn_builder
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\python\estimator\canned\dnn.py", line 27, in <module>
from tensorflow_estimator.python.estimator import estimator
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 36, in <module>
from tensorflow.python.profiler import trace
ImportError: cannot import name 'trace'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 3343, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-6-712e23ddfaeb>", line 8, in <module>
layers='heads')
File "F:\Khalid\Documents\miniconda3\envs\crowdai-mapping-challenge-mask-rcnn-master\crowdai-mapping-challenge-mask-rcnn-master\mrcnn\model.py", line 2287, in train
histogram_freq=0, write_graph=True, write_images=False),
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\keras\callbacks\tensorboard_v1.py", line 98, in __init__
raise ImportError('You need the TensorFlow (v1) module installed to '
ImportError: You need the TensorFlow (v1) module installed to use TensorBoard.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'ImportError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 3263, in run_ast_nodes
if (await self.run_code(code, result, async_=asy)):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 3360, in run_code
self.showtraceback(running_compiled_code=True)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 2047, in showtraceback
value, tb, tb_offset=tb_offset)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1436, in structured_traceback
self, etype, value, tb, tb_offset, number_of_lines_of_context)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1336, in structured_traceback
self, etype, value, tb, tb_offset, number_of_lines_of_context
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1193, in structured_traceback
tb_offset)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1150, in format_exception_as_a_whole
last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 451, in find_recursion
return len(records), 0
TypeError: object of type 'NoneType' has no len()
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'TypeError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1169, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 316, in wrapped
return f(*args, **kwargs)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 350, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\inspect.py", line 1490, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\inspect.py", line 1448, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), '__loader__', None) is not None:
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\inspect.py", line 733, in getmodule
if ismodule(module) and hasattr(module, '__file__'):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.estimator'
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\keras\callbacks\tensorboard_v1.py", line 96, in __init__
from tensorflow.contrib.tensorboard.plugins import projector
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\contrib\__init__.py", line 39, in <module>
from tensorflow.contrib import compiler
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\contrib\compiler\__init__.py", line 21, in <module>
from tensorflow.contrib.compiler import jit
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\contrib\compiler\__init__.py", line 22, in <module>
from tensorflow.contrib.compiler import xla
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\contrib\compiler\xla.py", line 22, in <module>
from tensorflow.python.estimator import model_fn as model_fn_lib
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_core\python\estimator\model_fn.py", line 26, in <module>
from tensorflow_estimator.python.estimator import model_fn
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\__init__.py", line 10, in <module>
from tensorflow_estimator._api.v1 import estimator
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\_api\v1\estimator\__init__.py", line 10, in <module>
from tensorflow_estimator._api.v1.estimator import experimental
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\_api\v1\estimator\experimental\__init__.py", line 10, in <module>
from tensorflow_estimator.python.estimator.canned.dnn import dnn_logit_fn_builder
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\python\estimator\canned\dnn.py", line 27, in <module>
from tensorflow_estimator.python.estimator import estimator
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 36, in <module>
from tensorflow.python.profiler import trace
ImportError: cannot import name 'trace'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 3343, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-6-712e23ddfaeb>", line 8, in <module>
layers='heads')
File "F:\Khalid\Documents\miniconda3\envs\crowdai-mapping-challenge-mask-rcnn-master\crowdai-mapping-challenge-mask-rcnn-master\mrcnn\model.py", line 2287, in train
histogram_freq=0, write_graph=True, write_images=False),
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\keras\callbacks\tensorboard_v1.py", line 98, in __init__
raise ImportError('You need the TensorFlow (v1) module installed to '
ImportError: You need the TensorFlow (v1) module installed to use TensorBoard.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'ImportError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 3263, in run_ast_nodes
if (await self.run_code(code, result, async_=asy)):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 3360, in run_code
self.showtraceback(running_compiled_code=True)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 2047, in showtraceback
value, tb, tb_offset=tb_offset)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1436, in structured_traceback
self, etype, value, tb, tb_offset, number_of_lines_of_context)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1336, in structured_traceback
self, etype, value, tb, tb_offset, number_of_lines_of_context
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1193, in structured_traceback
tb_offset)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1150, in format_exception_as_a_whole
last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 451, in find_recursion
return len(records), 0
TypeError: object of type 'NoneType' has no len()
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'TypeError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 2895, in _run_cell
return runner(coro)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\async_helpers.py", line 68, in _pseudo_sync_runner
coro.send(None)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 3072, in run_cell_async
interactivity=interactivity, compiler=compiler, result=result)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 3282, in run_ast_nodes
self.showtraceback()
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 2047, in showtraceback
value, tb, tb_offset=tb_offset)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1436, in structured_traceback
self, etype, value, tb, tb_offset, number_of_lines_of_context)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1336, in structured_traceback
self, etype, value, tb, tb_offset, number_of_lines_of_context
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1211, in structured_traceback
chained_exceptions_tb_offset)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1150, in format_exception_as_a_whole
last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 451, in find_recursion
return len(records), 0
TypeError: object of type 'NoneType' has no len()
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'TypeError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 1169, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 316, in wrapped
return f(*args, **kwargs)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\IPython\core\ultratb.py", line 350, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\inspect.py", line 1490, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\inspect.py", line 1448, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), '__loader__', None) is not None:
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\inspect.py", line 733, in getmodule
if ismodule(module) and hasattr(module, '__file__'):
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "F:\Khalid\Documents\miniconda3\envs\crowdAI2\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.estimator'

Upgrade the Tensorflow version
pip install tensorflow --upgrade
In Tensorflow 2.7.0. Use
from tensorflow.profiler.experimental import Trace

Related

ERROR:root:Internal Python error in the inspect module. Below is the traceback from this internal error

I want to calculate the following CNN.
I launched the Jupyter notebook via Anaconda.
The calculation should be done via the GPU.
Unfortunately, I got the following error message. Any Ideas regarding my issue?
history = model.fit(
train_generator,
steps_per_epoch= len(train_generator)//batch_size,
epochs=epochs,
validation_data=val_generator,
validation_steps=nb_validation_samples // batch_size,
callbacks=callbacks)
WARNING:tensorflow:sample_weight modes were coerced from
...
to
['...']
WARNING:tensorflow:sample_weight modes were coerced from
...
to
['...']
WARNING:tensorflow:sample_weight modes were coerced from
...
to
['...']
WARNING:tensorflow:sample_weight modes were coerced from
...
to
['...']
Train for 44 steps, validate for 130 steps
Epoch 1/5
1/44 [..............................] - ETA: 7:40
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 3343, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-19-af7d18342167>", line 8, in <module>
callbacks=callbacks)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 819, in fit
use_multiprocessing=use_multiprocessing)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 342, in fit
total_epochs=epochs)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 128, in run_one_epoch
batch_outs = execution_function(iterator)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\keras\engine\training_v2_utils.py", line 98, in execution_function
distributed_function(input_fn))
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\def_function.py", line 568, in __call__
result = self._call(*args, **kwds)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\def_function.py", line 632, in _call
return self._stateless_fn(*args, **kwds)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\function.py", line 2363, in __call__
return graph_function._filtered_call(args, kwargs) # pylint: disable=protected-access
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\function.py", line 1611, in _filtered_call
self.captured_inputs)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\function.py", line 1692, in _call_flat
ctx, args, cancellation_manager=cancellation_manager))
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\function.py", line 545, in call
ctx=ctx)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\execute.py", line 67, in quick_execute
six.raise_from(core._status_to_exception(e.code, message), None)
File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[7,96,524,524] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
[[node sequential_1/conv2d_3/Conv2D (defined at <ipython-input-19-af7d18342167>:8) ]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.
[Op:__inference_distributed_function_1811]
Function call stack:
distributed_function
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'ResourceExhaustedError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1169, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 316, in wrapped
return f(*args, **kwargs)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 350, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\inspect.py", line 1490, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\inspect.py", line 1448, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), '__loader__', None) is not None:
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\inspect.py", line 733, in getmodule
if ismodule(module) and hasattr(module, '__file__'):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.estimator'
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 3343, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-19-af7d18342167>", line 8, in <module>
callbacks=callbacks)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 819, in fit
use_multiprocessing=use_multiprocessing)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 342, in fit
total_epochs=epochs)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 128, in run_one_epoch
batch_outs = execution_function(iterator)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\keras\engine\training_v2_utils.py", line 98, in execution_function
distributed_function(input_fn))
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\def_function.py", line 568, in __call__
result = self._call(*args, **kwds)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\def_function.py", line 632, in _call
return self._stateless_fn(*args, **kwds)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\function.py", line 2363, in __call__
return graph_function._filtered_call(args, kwargs) # pylint: disable=protected-access
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\function.py", line 1611, in _filtered_call
self.captured_inputs)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\function.py", line 1692, in _call_flat
ctx, args, cancellation_manager=cancellation_manager))
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\function.py", line 545, in call
ctx=ctx)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\execute.py", line 67, in quick_execute
six.raise_from(core._status_to_exception(e.code, message), None)
File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[7,96,524,524] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
[[node sequential_1/conv2d_3/Conv2D (defined at <ipython-input-19-af7d18342167>:8) ]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.
[Op:__inference_distributed_function_1811]
Function call stack:
distributed_function
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'ResourceExhaustedError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 3263, in run_ast_nodes
if (await self.run_code(code, result, async_=asy)):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 3360, in run_code
self.showtraceback(running_compiled_code=True)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 2047, in showtraceback
value, tb, tb_offset=tb_offset)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1436, in structured_traceback
self, etype, value, tb, tb_offset, number_of_lines_of_context)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1336, in structured_traceback
self, etype, value, tb, tb_offset, number_of_lines_of_context
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1193, in structured_traceback
tb_offset)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1150, in format_exception_as_a_whole
last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 451, in find_recursion
return len(records), 0
TypeError: object of type 'NoneType' has no len()
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'TypeError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1169, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 316, in wrapped
return f(*args, **kwargs)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 350, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\inspect.py", line 1490, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\inspect.py", line 1448, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), '__loader__', None) is not None:
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\inspect.py", line 733, in getmodule
if ismodule(module) and hasattr(module, '__file__'):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.estimator'
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 3343, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-19-af7d18342167>", line 8, in <module>
callbacks=callbacks)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 819, in fit
use_multiprocessing=use_multiprocessing)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 342, in fit
total_epochs=epochs)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 128, in run_one_epoch
batch_outs = execution_function(iterator)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\keras\engine\training_v2_utils.py", line 98, in execution_function
distributed_function(input_fn))
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\def_function.py", line 568, in __call__
result = self._call(*args, **kwds)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\def_function.py", line 632, in _call
return self._stateless_fn(*args, **kwds)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\function.py", line 2363, in __call__
return graph_function._filtered_call(args, kwargs) # pylint: disable=protected-access
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\function.py", line 1611, in _filtered_call
self.captured_inputs)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\function.py", line 1692, in _call_flat
ctx, args, cancellation_manager=cancellation_manager))
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\function.py", line 545, in call
ctx=ctx)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow_core\python\eager\execute.py", line 67, in quick_execute
six.raise_from(core._status_to_exception(e.code, message), None)
File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[7,96,524,524] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
[[node sequential_1/conv2d_3/Conv2D (defined at <ipython-input-19-af7d18342167>:8) ]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.
[Op:__inference_distributed_function_1811]
Function call stack:
distributed_function
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'ResourceExhaustedError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 3263, in run_ast_nodes
if (await self.run_code(code, result, async_=asy)):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 3360, in run_code
self.showtraceback(running_compiled_code=True)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 2047, in showtraceback
value, tb, tb_offset=tb_offset)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1436, in structured_traceback
self, etype, value, tb, tb_offset, number_of_lines_of_context)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1336, in structured_traceback
self, etype, value, tb, tb_offset, number_of_lines_of_context
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1193, in structured_traceback
tb_offset)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1150, in format_exception_as_a_whole
last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 451, in find_recursion
return len(records), 0
TypeError: object of type 'NoneType' has no len()
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'TypeError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 2895, in _run_cell
return runner(coro)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\async_helpers.py", line 68, in _pseudo_sync_runner
coro.send(None)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 3072, in run_cell_async
interactivity=interactivity, compiler=compiler, result=result)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 3282, in run_ast_nodes
self.showtraceback()
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 2047, in showtraceback
value, tb, tb_offset=tb_offset)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1436, in structured_traceback
self, etype, value, tb, tb_offset, number_of_lines_of_context)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1336, in structured_traceback
self, etype, value, tb, tb_offset, number_of_lines_of_context
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1211, in structured_traceback
chained_exceptions_tb_offset)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1150, in format_exception_as_a_whole
last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 451, in find_recursion
return len(records), 0
TypeError: object of type 'NoneType' has no len()
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\interactiveshell.py", line 2044, in showtraceback
stb = value._render_traceback_()
AttributeError: 'TypeError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 1169, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 316, in wrapped
return f(*args, **kwargs)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\IPython\core\ultratb.py", line 350, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\inspect.py", line 1490, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\inspect.py", line 1448, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), '__loader__', None) is not None:
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\inspect.py", line 733, in getmodule
if ismodule(module) and hasattr(module, '__file__'):
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "C:\ProgramData\Anaconda3\envs\PythonGPU\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.estimator'
There is a problem with installed TensorFlow version and other existing modules version mismatch in your system.
Please reinstall the upgraded TensorFlow version and restart the kernel in the existing conda environment.
!pip install --upgrade tensorflow
Also, please avoid using steps_per_epoch and validation_steps in model training, because the model calculates these steps automatically while training if batch size is given.

pyttsx3 python speech module throwing handling exceptions

i was trying to get audio output using pyttsx3 in python
here is the code:
import pyttsx3
def speak(text):
engine = pyttsx3.init()
engine.say(text)
engine.runAndWait()
speak("hello world")
It is throwing handling errors which i am not able to understand:
Traceback (most recent call last):
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\pyttsx3_init_.py", line 20, in init
eng = _activeEngines[driverName]
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\weakref.py", line 137, in getitem
o = self.datakey
KeyError: None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\pyttsx3\drivers\sapi5.py", line 3, in <module>
from comtypes.gen import SpeechLib # comtypes
ImportError: cannot import name 'SpeechLib' from 'comtypes.gen' (C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\comtypes\gen\__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 121, in WINFUNCTYPE
return _win_functype_cache[(restype, argtypes, flags)]
KeyError: (<class 'ctypes.HRESULT'>, (<class 'comtypes.automation.tagVARIANT'>, <class 'comtypes.automation.LP_tagVARIANT'>, <class 'ctypes.c_long'>), 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/Learning/100dayscode/python/voice.py", line 132, in <module>
speak("Hello ")
File "D:/Learning/100dayscode/python/voice.py", line 23, in speak
engine = pyttsx3.init()
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\pyttsx3\__init__.py", line 22, in init
eng = Engine(driverName, debug)
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\pyttsx3\engine.py", line 30, in __init__
self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\pyttsx3\driver.py", line 50, in __init__
self._module = importlib.import_module(name)
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\pyttsx3\drivers\sapi5.py", line 6, in <module>
engine = comtypes.client.CreateObject("SAPI.SpVoice")
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\comtypes\client\__init__.py", line 250, in CreateObject
return _manage(obj, clsid, interface=interface)
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\comtypes\client\__init__.py", line 188, in _manage
obj = GetBestInterface(obj)
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\comtypes\client\__init__.py", line 110, in GetBestInterface
mod = GetModule(tlib)
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\comtypes\client\_generate.py", line 110, in GetModule
mod = _CreateWrapper(tlib, pathname)
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\comtypes\client\_generate.py", line 184, in _CreateWrapper
mod = _my_import(fullname)
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\comtypes\client\_generate.py", line 24, in _my_import
return __import__(fullname, globals(), locals(), ['DUMMY'])
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\comtypes\gen\_C866CA3A_32F7_11D2_9602_00C04F8EE628_0_5_4.py", line 365, in <module>
( ['out', 'retval'], POINTER(POINTER(ISpeechObjectTokens)), 'ObjectTokens' )),
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\comtypes\__init__.py", line 329, in __setattr__
self._make_methods(value)
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\site-packages\comtypes\__init__.py", line 698, in _make_methods
prototype = WINFUNCTYPE(restype, *argtypes)
File "C:\Users\harshit\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 123, in WINFUNCTYPE
class WinFunctionType(_CFuncPtr):
TypeError: item 1 in _argtypes_ passes a union by value, which is unsupported.
Well i figured it out.
It looks like the new version of pip have conflicts with updates.
This code worked for me
python -m pip install pyttsx3==2.71

AttributeError while loading saved model in tensorflow format into keras

I have some issues while trying to load saved models back into keras. Saving the model goes fine:
In [6]: model.save('savefile', save_format='tf')
INFO:tensorflow:Assets written to: savefile/assets
But when loading the model, I got the following error:
In [7]: tf.keras.models.load_model('savefile')
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/IPython/core/interactiveshell.py", line 2881, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-7-ddb252fa0c51>", line 1, in <module>
tf.keras.models.load_model('lofasz.xx')
File "/usr/local/lib/python3.5/dist-packages/tensorflow_core/python/keras/saving/save.py", line 190, in load_model
return saved_model_load.load(filepath, compile)
File "/usr/local/lib/python3.5/dist-packages/tensorflow_core/python/keras/saving/saved_model/load.py", line 105, in load
model = tf_load.load_internal(path, loader_cls=KerasObjectLoader)
File "/usr/local/lib/python3.5/dist-packages/tensorflow_core/python/saved_model/load.py", line 599, in load_internal
export_dir)
File "/usr/local/lib/python3.5/dist-packages/tensorflow_core/python/keras/saving/saved_model/load.py", line 170, in __init__
super(KerasObjectLoader, self).__init__(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/tensorflow_core/python/saved_model/load.py", line 122, in __init__
self._load_all()
File "/usr/local/lib/python3.5/dist-packages/tensorflow_core/python/keras/saving/saved_model/load.py", line 183, in _load_all
self._finalize_objects()
File "/usr/local/lib/python3.5/dist-packages/tensorflow_core/python/keras/saving/saved_model/load.py", line 394, in _finalize_objects
self._reconstruct_all_models()
File "/usr/local/lib/python3.5/dist-packages/tensorflow_core/python/keras/saving/saved_model/load.py", line 412, in _reconstruct_all_models
self._reconstruct_model(model_id, model, layers)
File "/usr/local/lib/python3.5/dist-packages/tensorflow_core/python/keras/saving/saved_model/load.py", line 442, in _reconstruct_model
model._set_inputs(input_shape) # pylint: disable=protected-access
File "/usr/local/lib/python3.5/dist-packages/tensorflow_core/python/keras/engine/training.py", line 2448, in _set_inputs
inputs = self._set_input_attrs(inputs)
File "/usr/local/lib/python3.5/dist-packages/tensorflow_core/python/training/tracking/base.py", line 456, in _method_wrapper
result = method(self, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/tensorflow_core/python/keras/engine/training.py", line 2487, in _set_input_attrs
input_shape = (None,) + tuple(inputs.shape[1:])
AttributeError: 'list' object has no attribute 'shape'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/IPython/core/interactiveshell.py", line 1821, in showtraceback
stb = value._render_traceback_()
AttributeError: 'AttributeError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/IPython/core/ultratb.py", line 1132, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "/usr/lib/python3/dist-packages/IPython/core/ultratb.py", line 313, in wrapped
return f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/IPython/core/ultratb.py", line 358, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "/usr/lib/python3.5/inspect.py", line 1454, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "/usr/lib/python3.5/inspect.py", line 1411, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "/usr/lib/python3.5/inspect.py", line 671, in getsourcefile
if getattr(getmodule(object, filename), '__loader__', None) is not None:
File "/usr/lib/python3.5/inspect.py", line 717, in getmodule
os.path.realpath(f)] = module.__name__
AttributeError: module has no attribute '__name__'
---------------------------------------------------------------------------
Loading with tf.saved_model.load does work:
In [9]: qq=tf.saved_model.load('savefile')
In [10]: qq
Out[10]: <tensorflow.python.saved_model.load.Loader._recreate_base_user_object.<locals>._UserObject at 0x7fdff155feb8>
but I didn't find anything on how to get this back as a keras model. Any ideas?

Error importing pmdarima.arima library in Python

Can someone help me resolve the following error message when trying to import the pmdarima.arima library for Python?
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.
Traceback (most recent call last):
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3326, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-1-6858fadc5169>", line 1, in <module>
from pmdarima.arima import auto_arima
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/pmdarima/__init__.py", line 45, in <module>
from .arima import auto_arima, ARIMA, AutoARIMA
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/pmdarima/arima/__init__.py", line 6, in <module>
from .arima import *
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/pmdarima/arima/arima.py", line 10, in <module>
from sklearn.metrics import mean_absolute_error, mean_squared_error
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/sklearn/metrics/__init__.py", line 7, in <module>
from .ranking import auc
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/sklearn/metrics/ranking.py", line 35, in <module>
from ..preprocessing import label_binarize
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/sklearn/preprocessing/__init__.py", line 6, in <module>
from ._function_transformer import FunctionTransformer
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/sklearn/preprocessing/_function_transformer.py", line 5, in <module>
from ..utils.testing import assert_allclose_dense_sparse
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/sklearn/utils/testing.py", line 718, in <module>
import pytest
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/pytest.py", line 13, in <module>
from _pytest.fixtures import fixture, yield_fixture
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/_pytest/fixtures.py", line 842, in <module>
class FixtureFunctionMarker(object):
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/_pytest/fixtures.py", line 844, in FixtureFunctionMarker
params = attr.ib(convert=attr.converters.optional(tuple))
TypeError: attrib() got an unexpected keyword argument 'convert'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2040, in showtraceback
stb = value._render_traceback_()
AttributeError: 'TypeError' object has no attribute '_render_traceback_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/IPython/core/ultratb.py", line 1101, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/IPython/core/ultratb.py", line 319, in wrapped
return f(*args, **kwargs)
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/IPython/core/ultratb.py", line 353, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "/Users/jdoe/anaconda3/lib/python3.6/inspect.py", line 1490, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "/Users/jdoe/anaconda3/lib/python3.6/inspect.py", line 1448, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "/Users/jdoe/anaconda3/lib/python3.6/inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), '__loader__', None) is not None:
File "/Users/jdoe/anaconda3/lib/python3.6/inspect.py", line 733, in getmodule
if ismodule(module) and hasattr(module, '__file__'):
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/py/_vendored_packages/apipkg.py", line 195, in __getattribute__
return getattr(getmod(), name)
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/py/_vendored_packages/apipkg.py", line 179, in getmod
x = importobj(modpath, None)
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/py/_vendored_packages/apipkg.py", line 69, in importobj
module = __import__(modpath, None, None, ['__doc__'])
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/pytest.py", line 13, in <module>
from _pytest.fixtures import fixture, yield_fixture
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/_pytest/fixtures.py", line 842, in <module>
class FixtureFunctionMarker(object):
File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/_pytest/fixtures.py", line 844, in FixtureFunctionMarker
params = attr.ib(convert=attr.converters.optional(tuple))
TypeError: attrib() got an unexpected keyword argument 'convert'
I searched up the type error that appears at the end, which led me to a related StackOverflow question whose answer suggested an outdated version of pytest would cause issues. I've since upgraded my version of pytest which resolved my issue.

Error while creating conda environment in windows 10

I am trying to create conda virtual environment to use Tensorflow 1.14 inside of it. I have two environments already and they are working fine. But, when I ran the command conda create -n bert python=3.6 I got the following error.
Os -Windows 10
Python = 3.7 default one
Conda Version = 4.7.11
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", line 1062, in __call__
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 80, in do_call
module = import_module(relative_mod, __name__.rsplit('.', 1)[0])
File "C:\ProgramData\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main_create.py", line 10, in <module>
from .install import install
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\install.py", line 19, in <module>
from ..core.index import calculate_channel_urls, get_index
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\index.py", line 9, in <module>
from .package_cache_data import PackageCacheData
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 15, in <module>
from .path_actions import CacheUrlAction, ExtractPackageAction
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\path_actions.py", line 30, in <module>
from ..gateways.connection.download import download
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\gateways\connection\download.py", line 18, in <module>
from .session import CondaSession
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\gateways\connection\session.py", line 13, in <module>
from .adapters.s3 import S3Adapter
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\gateways\connection\adapters\s3.py", line 14, in <module>
boto3.client('s3') # https://github.com/conda/conda/issues/8993
File "C:\ProgramData\Anaconda3\lib\site-packages\boto3\__init__.py", line 91, in client
return _get_default_session().client(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\boto3\session.py", line 263, in client
aws_session_token=aws_session_token, config=config)
File "C:\ProgramData\Anaconda3\lib\site-packages\botocore\session.py", line 839, in create_client
client_config=config, api_version=api_version)
File "C:\ProgramData\Anaconda3\lib\site-packages\botocore\client.py", line 86, in create_client
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "C:\ProgramData\Anaconda3\lib\site-packages\botocore\client.py", line 328, in _get_client_args
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "C:\ProgramData\Anaconda3\lib\site-packages\botocore\args.py", line 85, in get_client_args
client_cert=new_config.client_cert)
File "C:\ProgramData\Anaconda3\lib\site-packages\botocore\endpoint.py", line 259, in create_endpoint
if not is_valid_endpoint_url(endpoint_url):
File "C:\ProgramData\Anaconda3\lib\site-packages\botocore\utils.py", line 842, in is_valid_endpoint_url
parts = urlsplit(endpoint_url)
File "C:\ProgramData\Anaconda3\lib\urllib\parse.py", line 456, in urlsplit
raise ValueError("Invalid IPv6 URL")
ValueError: Invalid IPv6 URL
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Scripts\conda-script.py", line 12, in <module>
sys.exit(main())
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main.py", line 150, in main
return conda_exception_handler(_main, *args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", line 1354, in conda_exception_handler
return_value = exception_handler(func, *args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", line 1065, in __call__
return self.handle_exception(exc_val, exc_tb)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", line 1109, in handle_exception
return self.handle_unexpected_exception(exc_val, exc_tb)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", line 1120, in handle_unexpected_exception
self.print_unexpected_error_report(error_report)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", line 1190, in print_unexpected_error_report
from .cli.main_info import get_env_vars_str, get_main_info_str
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main_info.py", line 19, in <module>
from ..core.index import _supplement_index_with_system
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\index.py", line 9, in <module>
from .package_cache_data import PackageCacheData
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 15, in <module>
from .path_actions import CacheUrlAction, ExtractPackageAction
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\path_actions.py", line 30, in <module>
from ..gateways.connection.download import download
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\gateways\connection\download.py", line 18, in <module>
from .session import CondaSession
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\gateways\connection\session.py", line 13, in <module>
from .adapters.s3 import S3Adapter
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\gateways\connection\adapters\s3.py", line 14, in <module>
boto3.client('s3') # https://github.com/conda/conda/issues/8993
File "C:\ProgramData\Anaconda3\lib\site-packages\boto3\__init__.py", line 91, in client
return _get_default_session().client(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\boto3\session.py", line 263, in client
aws_session_token=aws_session_token, config=config)
File "C:\ProgramData\Anaconda3\lib\site-packages\botocore\session.py", line 839, in create_client
client_config=config, api_version=api_version)
File "C:\ProgramData\Anaconda3\lib\site-packages\botocore\client.py", line 86, in create_client
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "C:\ProgramData\Anaconda3\lib\site-packages\botocore\client.py", line 328, in _get_client_args
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "C:\ProgramData\Anaconda3\lib\site-packages\botocore\args.py", line 85, in get_client_args
client_cert=new_config.client_cert)
File "C:\ProgramData\Anaconda3\lib\site-packages\botocore\endpoint.py", line 259, in create_endpoint
if not is_valid_endpoint_url(endpoint_url):
File "C:\ProgramData\Anaconda3\lib\site-packages\botocore\utils.py", line 842, in is_valid_endpoint_url
parts = urlsplit(endpoint_url)
File "C:\ProgramData\Anaconda3\lib\urllib\parse.py", line 456, in urlsplit
raise ValueError("Invalid IPv6 URL")
ValueError: Invalid IPv6 URL
How to solve this error? What is causing this?
saw "ValueError: Invalid IPv6 URL"
try change you ip from ipv6 to ipv4, and install again.

Categories

Resources