Tensorflow-io issue

Hi, am running YAMNet for environmental sound classification, and I am getting an error today that I don’t get two days ago, any suggestions? and seems the problems is related to Tensorflow-IO

WARNING:tensorflow:AutoGraph could not transform <function resample at 0x7f02dddae4d0> and will run it as-is.
Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output.
Cause: unable to open file: libtensorflow_io.so, from paths: [’/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so’]
caused by: [’/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so: undefined symbol: _ZN10tensorflow4data11DatasetBase8FinalizeEPNS_15OpKernelContextESt8functionIFNS_8StatusOrISt10unique_ptrIS1_NS_4core15RefCountDeleterEEEEvEE’]
To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert
WARNING:tensorflow:AutoGraph could not transform <function resample at 0x7f02dddae4d0> and will run it as-is.
Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output.
Cause: unable to open file: libtensorflow_io.so, from paths: [’/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so’]
caused by: [’/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so: undefined symbol: _ZN10tensorflow4data11DatasetBase8FinalizeEPNS_15OpKernelContextESt8functionIFNS_8StatusOrISt10unique_ptrIS1_NS_4core15RefCountDeleterEEEEvEE’]
To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert
WARNING: AutoGraph could not transform <function resample at 0x7f02dddae4d0> and will run it as-is.
Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output.
Cause: unable to open file: libtensorflow_io.so, from paths: [’/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so’]
caused by: [’/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so: undefined symbol: _ZN10tensorflow4data11DatasetBase8FinalizeEPNS_15OpKernelContextESt8functionIFNS_8StatusOrISt10unique_ptrIS1_NS_4core15RefCountDeleterEEEEvEE’]
To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert

NotImplementedError Traceback (most recent call last)
in ()
76
77 while True:
—> 78 schedule.run_pending()
79 time.sleep(1)

6 frames
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/func_graph.py in autograph_handler(*args, **kwargs)
1127 except Exception as e: # pylint:disable=broad-except
1128 if hasattr(e, “ag_error_metadata”):
→ 1129 raise e.ag_error_metadata.to_exception(e)
1130 else:
1131 raise

NotImplementedError: in user code:

File "<ipython-input-11-e741e9a3c44d>", line 30, in load_wav_16k_mono  *
    wav = tfio.audio.resample(wav, rate_in=sample_rate, rate_out=16000)
File "/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/audio_ops.py", line 462, in resample  **
    value = tf.vectorized_map(f, input)
File "/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/audio_ops.py", line 458, in f
    return core_ops.io_audio_resample(
File "/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/__init__.py", line 88, in __getattr__
    return getattr(self._load(), attrb)
File "/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/__init__.py", line 84, in _load
    self._mod = _load_library(self._library)
File "/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/__init__.py", line 71, in _load_library
    + f"{filename}, from paths: {filenames}\ncaused by: {errs}"

NotImplementedError: unable to open file: libtensorflow_io.so, from paths: ['/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so']
caused by: ['/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so: undefined symbol: _ZN10tensorflow4data11DatasetBase8FinalizeEPNS_15OpKernelContextESt8functionIFNS_8StatusOrISt10unique_ptrIS1_NS_4core15RefCountDeleterEEEEvEE']
2 Likes

I got the same error with tfio.audio.AudioIOTensor(...)

But the thing is 3 days ago was working ok, so I am very interested in reaching the TensorFlow team out, seems a new update or something like that is generating that issue.

It should be the latest update which is in fact from 5 days ago. I “fixed” reverting to the 0.23.1

Please upvote and subscribe:

great! this is the solution
!pip install tensorflow_io==0.23.1

Hello everyone, I am having this same error, I have the following versions
Tensorflow: 2.12.0
Tensorflow_io: 0.31.0
I am attaching the error that I have, any help would be greatly appreciated, thanks

WARNING:tensorflow:AutoGraph could not transform <function decode_tiff at 0x000001F8B86DF9C0> and will run it as-is.
Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output.
Cause: unable to open file: libtensorflow_io.so, from paths: [‘C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_io\python\ops\libtensorflow_io.so’]
caused by: [‘C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_io\python\ops\libtensorflow_io.so not found’]
To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert
Traceback (most recent call last):
File “C:\Users\carol\OneDrive\Documentos\Sergio\Locura\blood.py”, line 72, in
train_dataset = data_generator(images, masks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\OneDrive\Documentos\Sergio\Locura\blood.py”, line 68, in data_generator
dataset = dataset.map(load_data, num_parallel_calls=tf.data.AUTOTUNE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\data\ops\dataset_ops.py”, line 2240, in map
return map_op._map_v2(
^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\data\ops\map_op.py”, line 40, in _map_v2
return _ParallelMapDataset(
^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\data\ops\map_op.py”, line 148, in init
self.map_func = structured_function.StructuredFunctionWrapper(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\data\ops\structured_function.py”, line 261, in
init
self.function = fn_factory()
^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\eager\polymorphic_function\tracing_compiler.py”, line 232, in get_concrete_function
concrete_function = self.get_concrete_function_garbage_collected(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\eager\polymorphic_function\tracing_compiler.py”, line 202, in get_concrete_function_garbage_collected
concrete_function, _ = self.maybe_define_concrete_function(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\eager\polymorphic_function\tracing_compiler.py”, line 166, in maybe_define_concrete_function
return self.maybe_define_function(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\eager\polymorphic_function\tracing_compiler.py”, line 396, in maybe_define_function
concrete_function = self.create_concrete_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\eager\polymorphic_function\tracing_compiler.py”, line 300, in create_concrete_function
func_graph_module.func_graph_from_py_func(
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\framework\func_graph.py”, line 1214, in func_graph_from_py_func
func_outputs = python_func(*func_args, **func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\data\ops\structured_function.py”, line 238, in
wrapped_fn
ret = wrapper_helper(*args)
^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\data\ops\structured_function.py”, line 169, in
wrapper_helper
ret = autograph.tf_convert(self.func, ag_ctx)(*nested_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\autograph\impl\api.py”, line 692, in wrapper
raise e.ag_error_metadata.to_exception(e)
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\autograph\impl\api.py”, line 689, in wrapper
return converted_call(f, args, kwargs, options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\autograph\impl\api.py”, line 439, in converted_call
result = converted_f(*effective_args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\carol\AppData\Local\Temp_autograph_generated_filev0mirzfw.py", line 10, in tf__load_data
image = ag
.converted_call(ag
.ld(read_files), (ag
.ld(image_list),), None, fscope)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\autograph\impl\api.py”, line 441, in converted_call
result = converted_f(*effective_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\carol\AppData\Local\Temp_autograph_generated_filedptlk_36.py", line 36, in tf__read_files
ag
.if_stmt(ag
.ld(mask), if_body, else_body, get_state, set_state, (‘image’,), 1)
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\autograph\operators\control_flow.py”, line 1266, in if_stmt
py_if_stmt(cond, body, orelse)
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\autograph\operators\control_flow.py”, line 1319, in py_if_stmt
return body() if cond else orelse()
^^^^^^^^
File "C:\Users\carol\AppData\Local\Temp_autograph_generated_filedptlk_36.py", line 31, in else_body
image = ag
.converted_call(ag
.ld(tfio).experimental.image.decode_tiff, (ag
.ld(image),), None, fscope)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\autograph\impl\api.py”, line 434, in converted_call
return _fall_back_unconverted(f, args, kwargs, options, e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\autograph\impl\api.py”, line 484, in _fall_back_unconverted
return _call_unconverted(f, args, kwargs, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\autograph\impl\api.py”, line 459, in call_unconverted
return f(*args)
^^^^^^^^
File “C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_io\python\experimental\image_ops.py”, line 87, in decode_tiff
return core_ops.io_decode_tiff(contents, index, name=name)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_io\python\ops_init
.py", line 88, in getattr
return getattr(self.load(), attrb)
^^^^^^^^^^^^
File "C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_io\python\ops_init
.py", line 84, in _load
self._mod = _load_library(self.library)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_io\python\ops_init
.py", line 69, in _load_library
raise NotImplementedError(
NotImplementedError: in user code:

File "C:\Users\carol\OneDrive\Documentos\Sergio\Locura\blood.py", line 62, in load_data  *
    image = read_files(image_list)
File "C:\Users\carol\OneDrive\Documentos\Sergio\Locura\blood.py", line 54, in read_files  *
    image = tfio.experimental.image.decode_tiff(image) # out: (h, w, 4)
File "C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_io\python\experimental\image_ops.py", line 87, in decode_tiff  **
    return core_ops.io_decode_tiff(contents, index, name=name)
File "C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_io\python\ops\__init__.py", line 88, in __getattr__ 
    return getattr(self._load(), attrb)
File "C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_io\python\ops\__init__.py", line 84, in _load       
    self._mod = _load_library(self._library)
File "C:\Users\carol\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_io\python\ops\__init__.py", line 69, in _load_library
    raise NotImplementedError(

NotImplementedError: unable to open file: libtensorflow_io.so, from paths: ['C:\\Users\\carol\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\tensorflow_io\\python\\ops\\libtensorflow_io.so']
caused by: ['C:\\Users\\carol\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\tensorflow_io\\python\\ops\\libtensorflow_io.so not found']
1 Like

Hi I am using python 3.11 , x86 windows 11, tensorflow-io == 0.31.0

The error is libtensorflow_io.so not found.

Complete error message:
NotImplementedError: unable to open file: libtensorflow_io.so, from paths: [‘C:\Users\bchai\PycharmProjects\AudioML\venv\Lib\site-packages\tensorflow_io\python\ops\libtensorflow_io.so’]
caused by: [‘C:\Users\bchai\PycharmProjects\AudioML\venv\Lib\site-packages\tensorflow_io\python\ops\libtensorflow_io.so not found’]

The file does exist at this location. I have tried downgrading tensorflow-io to 0.30.0 but that did not help either