question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FileNotFoundError: with Nature Dataset

See original GitHub issue

I was trying to follow the custom training for PixelLib with Nature dataset from (https://pixellib.readthedocs.io/en/latest/custom_train.html), and the following error shows up on my computer.

There are 600 listed files in folder train.
Converting labelme annotations to COCO format:   0%|          | 0/600 [00:00<?, ?it/s]
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-5-1d174ed15597> in <module>()
      5 
      6 vis_img = instance_custom_training()
----> 7 vis_img.load_dataset("Nature")
      8 vis_img.visualize_sample()

3 frames
/usr/local/lib/python3.7/dist-packages/PIL/Image.py in open(fp, mode, formats)
   2951 
   2952     if filename:
-> 2953         fp = builtins.open(filename, "rb")
   2954         exclusive_fp = True
   2955 

FileNotFoundError: [Errno 2] No such file or directory: '/content/Nature/train/..\\butterfly (176).jpg'

I tried it again on Google Colab provided on the documentation at (https://colab.research.google.com/drive/1LIhBcxF6TUQUQCMEXCRBuF4a7ycUmjuw?usp=sharing), and it still gives the same error.

May I know how to resolve this, thanks.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:11

github_iconTop GitHub Comments

1reaction
greg007-webcommented, Feb 18, 2022

The new version didn’t work. I had the same problem. Try this setting:

!pip3 uninstall tensorflow
!pip3 install tensorflow==2.4.1
!pip3 install tensorflow--gpu
!pip3 install imgaug
!pip install pixellib==0.5.2
!pip install labelme2coco==0.1.2

```I used an old version and now is working.
1reaction
secco88commented, Jan 28, 2022

maybe there is an error inside the json file: “imagePath”: “…\butterfly (1).png”

the …\ part isn’t necessary

Read more comments on GitHub >

github_iconTop Results From Across the Web

I found an error which is wrong is FileNotFoundError in python
I want to import the dataset but fail because he has an error that is there for two \ i do not know...
Read more >
deeplabcut.create_training_dataset: "FileNotFoundError: No ...
This particular image seems to be missing, so you cannot create the training set. You should first apply check_labels and see if you...
Read more >
[Solved Issue] ImageDataBunch.from_folder: No such file or ...
from_folder method, but it's showing the exact error. FileNotFoundError: [Errno 2] No such file or directory: 'dataset/valid/ALB' My train dir ...
Read more >
google/xtreme_s · Datasets at Hugging Face
Cannot get the split names for the dataset. Error code: SplitsNamesError Exception: SplitsNotFoundError Message: The split names could not be ...
Read more >
[WinError 3] The system cannot find the path specified
However, i encountered a FileNotFound error when i ran the script in the python command prompt: "FileNotFoundError: [WinError 3] The system ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found