Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 FileNotFoundError: No such file or no access

I am begging in python. I compile the code of and I got the error like this:

Quote: File "C:\Users\krasona\PycharmProjects\GlioblastomaSegmentation\venv\lib\site-packages\nibabel\", line 42, in load
raise FileNotFoundError("No such file or no access: '%s'" % filename)
FileNotFoundError: No such file or no access: 'C:\Users\krasona\PycharmProjects\GlioblastomaSegmentation\output\FLAIR_N4Bias.nii.gz'

The code looks like this :
        stat_result = os.stat(filename)
    except OSError:
        raise FileNotFoundError("No such file or no access: '%s'" % filename)
    if stat_result.st_size <= 0:
        raise ImageFileError("Empty file: '%s'" % filename)
    sniff = None
    for image_klass in all_image_classes:
        is_valid, sniff = image_klass.path_maybe_image(filename, sniff)
        if is_valid:
            img = image_klass.from_filename(filename, **kwargs)
            return img

    raise ImageFileError('Cannot work outfile type of "%s"' %

Could you help me to fix this issue ?

I would be appreciate for any help please.
The error is quite clear.
The file C:\Users\krasona\PycharmProjects\GlioblastomaSegmentation\output\FLAIR_N4Bias.nii.gz doesn't exist, or you don't have access to it.
So check if you have the file, and if you have access.
It didn't create this file.
Before It creates another files but this one was not created.

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Getting FileNotFoundError: [Errno 2] ,if tries to acees same file from sub-directory pmpinaki 2 323 May-04-2020, 03:39 PM
Last Post: pmpinaki
  Making .exe file that requires access to text and html files ClassicalSoul 0 127 Apr-23-2020, 05:03 PM
Last Post: ClassicalSoul
  FileNotFoundError: [Errno 2] No such file or directory saqib1066 23 2,899 Mar-16-2020, 01:25 PM
Last Post: saqib1066
  FileNotFoundError managment sal 2 488 Oct-23-2019, 09:18 AM
Last Post: sal
Question pdfkit.from_string('Hello!','out.pdf') gives FileNotFoundError sipriusPT 3 2,107 Sep-19-2019, 01:44 PM
Last Post: snippsat
  FileNotFoundError...System cannot find the path specified alex9745 28 9,022 Jul-23-2019, 05:14 AM
Last Post: alex9745
  File access / locking. MuntyScruntfundle 1 669 Oct-16-2018, 02:41 PM
Last Post: wavic
  FileNotFoundError: [Errno 2] No such file or directory: 'movies.csv' RedSkeleton007 5 8,631 Jul-01-2018, 09:10 PM
Last Post: snippsat
  FileNotFoundError when using subprocess dixitabhi 1 12,331 Mar-04-2018, 06:59 PM
Last Post: Larz60+
  python 2.7 access denied when writing a file to Windows kavise 2 7,084 Feb-13-2018, 08:30 PM
Last Post: kavise

Forum Jump:

Users browsing this thread: 1 Guest(s)