UnknownError: AttributeError: 'numpy.ndarray' object has no attribute 'replace'
Closed this issue · 0 comments
AlisterTA commented
I face the below mentioned error msg when i run train.py
UnknownError: AttributeError: 'numpy.ndarray' object has no attribute 'replace'
[[Node: PyFunc = PyFunc[Tin=[DT_STRING], Tout=[DT_STRING, DT_FLOAT, DT_FLOAT], token="pyfunc_0", _device="/job:localhost/replica:0/task:0/device:CPU:0"](input_producer/Gather)]]
Training Graph loaded
INFO:tensorflow:Starting standard services.
INFO:tensorflow:Starting queue runners.
0%| | 0/42 [00:00<?, ?b/s]
INFO:tensorflow:gs/global_step/sec: 0
INFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.UnknownError'>, AttributeError: 'numpy.ndarray' object has no attribute 'replace'
[[Node: PyFunc = PyFunc[Tin=[DT_STRING], Tout=[DT_STRING, DT_FLOAT, DT_FLOAT], token="pyfunc_0", _device="/job:localhost/replica:0/task:0/device:CPU:0"](input_producer/Gather)]]
---------------------------------------------------------------------------
OutOfRangeError Traceback (most recent call last)
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\client\session.py in _do_call(self, fn, *args)
1322 try:
-> 1323 return fn(*args)
1324 except errors.OpError as e:
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\client\session.py in _run_fn(session, feed_dict, fetch_list, target_list, options, run_metadata)
1301 feed_dict, fetch_list, target_list,
-> 1302 status, run_metadata)
1303
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\framework\errors_impl.py in __exit__(self, type_arg, value_arg, traceback_arg)
472 compat.as_text(c_api.TF_Message(self.status.status)),
--> 473 c_api.TF_GetCode(self.status.status))
474 # Delete the underlying status object from memory otherwise it stays alive
OutOfRangeError: FIFOQueue '_0_bucket_by_sequence_length/bucket/top_queue' is closed and has insufficient elements (requested 1, current size 0)
[[Node: bucket_by_sequence_length/bucket/dequeue_top = QueueDequeueV2[component_types=[DT_INT32, DT_INT32, DT_INT32, DT_FLOAT, DT_FLOAT, DT_STRING], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](bucket_by_sequence_length/bucket/top_queue)]]
During handling of the above exception, another exception occurred:
OutOfRangeError Traceback (most recent call last)
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\training\supervisor.py in managed_session(self, master, config, start_standard_services, close_summary_writer)
953 start_standard_services=start_standard_services)
--> 954 yield sess
955 except Exception as e:
<ipython-input-3-aada1ae82d48> in <module>()
128 for _ in tqdm(range(g.num_batch), total=g.num_batch, ncols=70, leave=False, unit='b'):
--> 129 gs, _ = sess.run([g.global_step, g.train_op])
130
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\client\session.py in run(self, fetches, feed_dict, options, run_metadata)
888 result = self._run(None, fetches, feed_dict, options_ptr,
--> 889 run_metadata_ptr)
890 if run_metadata:
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\client\session.py in _run(self, handle, fetches, feed_dict, options, run_metadata)
1119 results = self._do_run(handle, final_targets, final_fetches,
-> 1120 feed_dict_tensor, options, run_metadata)
1121 else:
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\client\session.py in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata)
1316 return self._do_call(_run_fn, self._session, feeds, fetches, targets,
-> 1317 options, run_metadata)
1318 else:
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\client\session.py in _do_call(self, fn, *args)
1335 pass
-> 1336 raise type(e)(node_def, op, message)
1337
OutOfRangeError: FIFOQueue '_0_bucket_by_sequence_length/bucket/top_queue' is closed and has insufficient elements (requested 1, current size 0)
[[Node: bucket_by_sequence_length/bucket/dequeue_top = QueueDequeueV2[component_types=[DT_INT32, DT_INT32, DT_INT32, DT_FLOAT, DT_FLOAT, DT_STRING], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](bucket_by_sequence_length/bucket/top_queue)]]
Caused by op 'bucket_by_sequence_length/bucket/dequeue_top', defined at:
File "c:\users\home\appdata\local\programs\python\python35\lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\home\appdata\local\programs\python\python35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\ipykernel_launcher.py", line 16, in <module>
app.launch_new_instance()
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance
app.start()
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\ipykernel\kernelapp.py", line 477, in start
ioloop.IOLoop.instance().start()
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\zmq\eventloop\ioloop.py", line 177, in start
super(ZMQIOLoop, self).start()
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tornado\ioloop.py", line 888, in start
handler_func(fd_obj, events)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tornado\stack_context.py", line 277, in null_wrapper
return fn(*args, **kwargs)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\zmq\eventloop\zmqstream.py", line 440, in _handle_events
self._handle_recv()
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\zmq\eventloop\zmqstream.py", line 472, in _handle_recv
self._run_callback(callback, msg)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\zmq\eventloop\zmqstream.py", line 414, in _run_callback
callback(*args, **kwargs)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tornado\stack_context.py", line 277, in null_wrapper
return fn(*args, **kwargs)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\ipykernel\kernelbase.py", line 283, in dispatcher
return self.dispatch_shell(stream, msg)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\ipykernel\kernelbase.py", line 235, in dispatch_shell
handler(stream, idents, msg)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\ipykernel\kernelbase.py", line 399, in execute_request
user_expressions, allow_stdin)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\ipykernel\ipkernel.py", line 196, in do_execute
res = shell.run_cell(code, store_history=store_history, silent=silent)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\ipykernel\zmqshell.py", line 533, in run_cell
return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\IPython\core\interactiveshell.py", line 2728, in run_cell
interactivity=interactivity, compiler=compiler, result=result)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\IPython\core\interactiveshell.py", line 2850, in run_ast_nodes
if self.run_code(code, result):
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\IPython\core\interactiveshell.py", line 2910, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-3-aada1ae82d48>", line 122, in <module>
g = Graph(num=num); print("Training Graph loaded")
File "<ipython-input-3-aada1ae82d48>", line 21, in __init__
self.L, self.mels, self.mags, self.fnames, self.num_batch = get_batch()
File "C:\Users\Home\AppData\Local\Programs\Python\Python35\Scripts\examples\dc_tts-master\data_load.py", line 121, in get_batch
dynamic_pad=True)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\contrib\training\python\training\bucket_ops.py", line 414, in bucket_by_sequence_length
shared_name=shared_name)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\contrib\training\python\training\bucket_ops.py", line 288, in bucket
dequeued = top_queue.dequeue(name="dequeue_top")
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\ops\data_flow_ops.py", line 421, in dequeue
self._queue_ref, self._dtypes, name=name)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\ops\gen_data_flow_ops.py", line 2602, in _queue_dequeue_v2
timeout_ms=timeout_ms, name=name)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\framework\ops.py", line 2956, in create_op
op_def=op_def)
File "c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\framework\ops.py", line 1470, in __init__
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
OutOfRangeError (see above for traceback): FIFOQueue '_0_bucket_by_sequence_length/bucket/top_queue' is closed and has insufficient elements (requested 1, current size 0)
[[Node: bucket_by_sequence_length/bucket/dequeue_top = QueueDequeueV2[component_types=[DT_INT32, DT_INT32, DT_INT32, DT_FLOAT, DT_FLOAT, DT_STRING], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](bucket_by_sequence_length/bucket/top_queue)]]
During handling of the above exception, another exception occurred:
UnknownError Traceback (most recent call last)
<ipython-input-3-aada1ae82d48> in <module>()
139
140 # break
--> 141 if gs > hp.num_iterations: break
142
143 print("Done")
c:\users\home\appdata\local\programs\python\python35\lib\contextlib.py in __exit__(self, type, value, traceback)
75 value = type()
76 try:
---> 77 self.gen.throw(type, value, traceback)
78 raise RuntimeError("generator didn't stop after throw()")
79 except StopIteration as exc:
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\training\supervisor.py in managed_session(self, master, config, start_standard_services, close_summary_writer)
962 # threads which are not checking for `should_stop()`. They
963 # will be stopped when we close the session further down.
--> 964 self.stop(close_summary_writer=close_summary_writer)
965 finally:
966 # Close the session to finish up all pending calls. We do not care
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\training\supervisor.py in stop(self, threads, close_summary_writer)
790 # reported.
791 self._coord.join(threads,
--> 792 stop_grace_period_secs=self._stop_grace_secs)
793 finally:
794 # Close the writer last, in case one of the running threads was using it.
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\training\coordinator.py in join(self, threads, stop_grace_period_secs, ignore_live_threads)
387 self._registered_threads = set()
388 if self._exc_info_to_raise:
--> 389 six.reraise(*self._exc_info_to_raise)
390 elif stragglers:
391 if ignore_live_threads:
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\six.py in reraise(tp, value, tb)
691 if value.__traceback__ is not tb:
692 raise value.with_traceback(tb)
--> 693 raise value
694 finally:
695 value = None
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\training\queue_runner_impl.py in _run(self, sess, enqueue_op, coord)
236 break
237 try:
--> 238 enqueue_callable()
239 except self._queue_closed_exception_types: # pylint: disable=catching-non-exception
240 # This exception indicates that a queue was closed.
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\client\session.py in _single_operation_run()
1229 with errors.raise_exception_on_not_ok_status() as status:
1230 tf_session.TF_Run(self._session, None, {}, [],
-> 1231 target_list_as_strings, status, None)
1232 return _single_operation_run
1233 elif isinstance(fetches, ops.Tensor):
c:\users\home\appdata\local\programs\python\python35\lib\site-packages\tensorflow\python\framework\errors_impl.py in __exit__(self, type_arg, value_arg, traceback_arg)
471 None, None,
472 compat.as_text(c_api.TF_Message(self.status.status)),
--> 473 c_api.TF_GetCode(self.status.status))
474 # Delete the underlying status object from memory otherwise it stays alive
475 # as there is a reference to status from this from the traceback due to
UnknownError: AttributeError: 'numpy.ndarray' object has no attribute 'replace'
[[Node: PyFunc = PyFunc[Tin=[DT_STRING], Tout=[DT_STRING, DT_FLOAT, DT_FLOAT], token="pyfunc_0", _device="/job:localhost/replica:0/task:0/device:CPU:0"](input_producer/Gather)]]