jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.76k stars 4.99k forks source link

Error! (file) is not UTF-8 encoded #5003

Open Nizami91 opened 5 years ago

Nizami91 commented 5 years ago

I cannot open the saved .npy file. As I click on the file to open it, I get the following text:

Error! C:\Users\Ozgun\workspace\saved_test.npy is not UTF-8 encoded Saving disabled. See Console for more details.

Please help.

jishanshaikh4 commented 5 years ago

It seems like this problem already has a solution here at an audio-classification repository.

mzr4332 commented 4 years ago

I was facing a similar problem because I was trying to open a compressed(zipped) folder that had an extension '.ipynb'. So I moved the actual IPYNB File in it to 'Desktop' and was then able to access it using jupyter.

majorfisg commented 4 years ago

Я столкнулся с аналогичной проблемой, потому что я пытался открыть сжатую(сжатую) папку, которая имела расширение '.ипынб'. Поэтому я переместил фактический файл IPYNB в нем на "рабочий стол", а затем смог получить доступ к нему с помощью jupyter.

The exact same problem. The .gz format archive broke the .ipynb file. Do not write in detail what they did?

onassis28 commented 4 years ago

use encoding 'cp1252'

awais-web commented 4 years ago

Just double check the file format you are trying to open. is it 'ipynb'?

scawa1952 commented 4 years ago

It seems like this problem already has a solution here at an audio-classification repository.

No it isn't. This is a circular reference that refers me back to this thread. Sounds like this is a Stack Overflow forum.

xiaodong-Ren commented 4 years ago

I had the same problem,have you solved it?I'm on the verge of collapse.

kevin-bates commented 4 years ago

Hi @xiaodong-Ren - If you could provide traceback and/or contextual information regarding, others may be able to assist. Thanks.

RokayaNeeraj commented 3 years ago

f = open("CORONA.csv","w",encoding='utf-8'). Use it behind and it will resolve the problem

vallabh1822 commented 3 years ago

This just means -"jupyter cannot read this file you need another viewer to see this file " it just a misleading error message. You just need to open this file where you saved it i.e C:\Users\Ozgun\workspace\saved_test.npy through your File Explorer. or you could originally encode it as 'utf-8' when you opened this file i.e file = open(filename, 'w', encoding='utf-8') Hope this helps!

codexsys-7 commented 2 years ago

Yes, the jupyter notebook cant read that file, you need to open it where you have saved it. Thanks, Vallabh1822, saved my day.

FardinN77 commented 1 year ago

Hi to all, I have the same problem when I want to load the MNIST dataset with this format (mnist. npz) in Jupyter; I use from below codes to import the file but this error appeared that showed my file does not exist (FileNotFoundError: [Errno 2] No such file or directory: 'MNIST_data/mnist.npz'). When I checked it from my files and tried to open it, another error appeared that said mnist.npz is not UTF-8 encoded.

How can I fix it? Help me pls.

My codes : import numpy as np path = "MNIST_data/mnist.npz" with np.load(path, allow_pickle=True) as f: print(type(f)) x_train, y_train = f['x_train'], f['y_train'] x_test, y_test = f['x_test'], f['y_test']