C2W3 assignment different header error


I am trying to complete the assignment for C2W3. I am at Exercise 2, starting the ExampleGen.

Unfortunately, I get an error stating:
RuntimeError: Files in same split ./data/training/fselect/* have different header.

This happens even if I try running the commented code in the cell above, which should fix this error. I also tried running the code to reset the folders “from scratch”, to no avail.

Could you please point me in the right direction?

Please click my name and message your notebook as an attachment.

I can’t seem to reproduce this in the the coursera lab environment. That said, have you tried running 1 cell above that contains this note? Don’t forget to uncomment the right lines before running the cell.

# # NOTE: Uncomment and run this if you get an error saying there are different 
# # headers in the dataset. This is usually because of the notebook checkpoints saved in 
# # that folder.

Thank you! :slight_smile:

I did and unfortunately it does not seem to fix the issue… I tried restarting everything, resetting the notebook, changing directory path, but I still get the error.

Do you know if there is any way to fix it?

I’ve notified the staff. Someone should get in touch with you.

One last try: Refreshing a workspace doesn’t replace files. That’s why you’re asked to rename / delete a file to get a fresh copy. Please do the following:

  1. Remove all files in your workspace
  2. Help > Get latest version
  3. Help > Reboot server
  4. Attempt lab

If that doesn’t work, see if coursera help center can get you out of this.

Thank you!!! It seems to be working now :slight_smile:


I am stuck on the last exercise, no matter how I change the code I get error after error…

Could you please help me? I can’t figure out how to fix this error. I even looked here C2W3 exercise 12, which seems to be the same issue, but can’t understand.

[code removed - moderator]

thanks in advance

Please don’t post code in public. It’s okay to share stacktrace though. You can message code to a mentor.

get_events_by_execution_ids expects and Iterator[int]. The variable execution_id is a set containing integers. Why do you need to wrap it in a list when calling this method?

Thank you!!! Stupid mistake on my end