C3_W3_A1_Assignment: FFmpge error

I have finished and passed Exercise 1 and Exercise 2, but when I ran the last cell of Python code, it displayed an ‘OSError’. It seems that there was an error during the execution of the ‘ffmpeg’ command.

Hi @Choi_Ting_Fung ,

Thank you for raising the issue. I will report this to the course staff.

Hi @Kic ,
I am seeing the same error when I run the notebook.

@BuzzKanga, thanks for your report.

Hi everyone and welcome to the community! Unfortunately, I can’t replicate the issue. Maybe there was just a temporary bug on Coursera. Can you try re-running it now? Also, do you get a perfect score when you submit the assignment? Thanks!

I can submit the assignment and obtain the score normally, but the error still persists when I run the code in the last cell.

Hi everyone! The issue should be fixed now, but in case it comes up again, please try either one of these two methods:

  • Method 1: Click on the Help icon on the upper right of your notebook, and then click on the Get Latest Version button.
  • Method 2: Click File -> Open to go to the Jupyter file tree. From there, rename the current videos folder to any other name. Then create a new videos folder.

After doing either of these, you can re-run the notebook and see if the error still pops up. There was a platform issue regarding file/folder permissions about 2 weeks ago that affected some learners but Coursera addressed it already. If it persists, just let us know so we can report it to our partners. Thank you!

Hi everyone,

i just have a similar effect: i did the exercises and they passed the test but running cell 15 shows the following issue and i just have no clue how to fix it.
would be great to get any help, thanks a lot in advance

NotImplementedError Traceback (most recent call last)
in
44 # Set the y targets, perform a gradient descent step,
45 # and update the network weights.
—> 46 agent_learn(experiences, GAMMA)
47
48 state = next_state.copy()

/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py in call(self, *args, **kwds)
566 xla_context.Exit()
567 else:
→ 568 result = self._call(*args, **kwds)
569
570 if tracing_count == self._get_tracing_count():

/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py in _call(self, *args, **kwds)
613 # This is the first call of call, so we have to initialize.
614 initializers =
→ 615 self._initialize(args, kwds, add_initializers_to=initializers)
616 finally:
617 # At this point we know that the initialization is complete (or less

/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py in _initialize(self, args, kwds, add_initializers_to)
495 self._concrete_stateful_fn = (
496 self._stateful_fn._get_concrete_function_internal_garbage_collected( # pylint: disable=protected-access
→ 497 *args, **kwds))
498
499 def invalid_creator_scope(*unused_args, **unused_kwds):

/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py in _get_concrete_function_internal_garbage_collected(self, *args, **kwargs)
2387 args, kwargs = None, None
2388 with self._lock:
→ 2389 graph_function, _, _ = self._maybe_define_function(args, kwargs)
2390 return graph_function
2391

/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py in _maybe_define_function(self, args, kwargs)
2701
2702 self._function_cache.missed.add(call_context_key)
→ 2703 graph_function = self._create_graph_function(args, kwargs)
2704 self._function_cache.primary[cache_key] = graph_function
2705 return graph_function, args, kwargs

/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py in _create_graph_function(self, args, kwargs, override_flat_arg_shapes)
2591 arg_names=arg_names,
2592 override_flat_arg_shapes=override_flat_arg_shapes,
→ 2593 capture_by_value=self._capture_by_value),
2594 self._function_attributes,
2595 # Tell the ConcreteFunction to clean up its graph once it goes out of

/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/func_graph.py in func_graph_from_py_func(name, python_func, args, kwargs, signature, func_graph, autograph, autograph_options, add_control_dependencies, arg_names, op_return_value, collections, capture_by_value, override_flat_arg_shapes)
976 converted_func)
977
→ 978 func_outputs = python_func(*func_args, **func_kwargs)
979
980 # invariant: func_outputs contains only Tensors, CompositeTensors,

/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py in wrapped_fn(*args, **kwds)
437 # wrapped allows AutoGraph to swap in a converted function. We give
438 # the function a weak reference to itself to avoid a reference cycle.
→ 439 return weak_wrapped_fn().wrapped(*args, **kwds)
440 weak_wrapped_fn = weakref.ref(wrapped_fn)
441

/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/func_graph.py in wrapper(*args, **kwargs)
966 except Exception as e: # pylint:disable=broad-except
967 if hasattr(e, “ag_error_metadata”):
→ 968 raise e.ag_error_metadata.to_exception(e)
969 else:
970 raise

NotImplementedError: in converted code:

<ipython-input-14-ebdf0fb43251>:14 agent_learn  *
    loss = compute_loss(experiences, gamma, q_network, target_q_network)
<ipython-input-12-16a407a82a4a>:37 compute_loss  *
    loss=np.dot(y_targets-q_values,y_targets-q_values)/len(y_targets)
<__array_function__ internals>:6 dot
    
/opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py:728 __array__
    " array.".format(self.name))

NotImplementedError: Cannot convert a symbolic Tensor (sub_2:0) to a numpy array.