Resolved: Cannot upload "Linear Regression Practical Example (Part 2) Notebook with Comments.ipynb" on Jupyter
Good morning. When I try to upload the file said above on Jupyter, it gives me the error "The error was: SyntaxError: Unexpected token 'e', "ewogImNlbG"... is not valid JSON". Other times nothing happens and the file doesn't appear among the items. How can I solve? Thank you
Hey Alessandro,
Thank you for sharing!
Unfortunately, I don't think I can reproduce the problem you are experiencing. I have downloaded the file from the Resources drop-down menu and run the Jupyter notebook without any trouble:
Could you please provide a screenshot?
Thank you!
Kind regards,
365 Hristina
Good morning. This is the screenshot:
Furthermore, when I try to upload it it appears automatically the name "LINEAR~1.IPY", and when I click to upload it nothing happens. If I change the extension to ".ipynb" (as it should be), it appears this error message. It's also a bit uncomfortable that everytime I try to upload a new file, I have to rename it as the original and to manually edit the extension. Nevertheless, the first files didn't give me this problem.
Hey again Alessandro,
That's very puzzling. I downloaded both files from the lecture shown on my screenshot - the names and extensions are as expected.
You are saying that by going to
Section 3 - Linear Regression Practical Example (Part 2) - Resources
and downloading the second file, it is downloaded on your machine as LINEAR~1.IPY? Which are the other files that this problem occurs on?
Kind regards,
365 Hristina
I have just tried: If I try to download it as you show in your screenshot, it works. But I had downloaded "All resources" from above in one time to save time. In this case, the names of the files are still correct, but when I upload them they automatically change the name to something like "LINEAR~1.IPY". I can notice now that it gives me this problem with all the files (I have already unzipped the .zip folder). I don't know why in the previous days I have been able to upload the files from Section 1 and Section 2 without any problems. If I try to upload the same files now, they give me this problem, too.
Hey,
Thank you for the reply!
Frankly, this is the first time I encounter this problem. So far, my best guess is that some metadata in a non-JSON format prevents Jupyter from opening the file. Unfortunately, I can't come up with an effective solution as I don't understand the problem in depth.
A workaround that might hopefully work is to not use the Upload button, but rather navigating to the relevant folder and opening the ipynb file from Jupyter notebook directly. In my case, that would mean navigating to
Downloads - machine-learning-in-python - Section 3 - 2_Linear Regression Practical Example (Part 2) - Course notes - Linear Regression Practical Example (Part 2) Notebook with Comments.ipynb
Hope this works!
Kind regards,
365 Hristina
How can I navigate to the relevant folder? I tried to click on the blue folder, but nothing happens.
Hey Alessandro,
I assume your downloads go into the Downloads folder? If that is the case, then download the resources folder, unzip it, click on Downloads in the Jupyter environment, find the machine-learning-in-python folder and navigate to the relevant notebook.
Kind regards,
365 Hristina
Ok it works this way. Thank you very much