What to do when [Errno 2] No such file or directory appears in Python


I thought that the relative path was written starting from the location of the program file.   ↓ Starting from the current directory Python 3 \ .x -Relative path setting in python | teratail

I thought the way to write the path in Windows was temp / file.txt.   ↓ temp \ file.txt is written on UNIX

approach

Referenced with an absolute path.


It's shocking because the way to write the path is different

Recommended Posts

What to do when [Errno 2] No such file or directory appears in Python
What to do when ModuleNotFoundError: No module named'XXX' occurs in Python
A story about what to do when a bad interpreter: Not such file or directory appears in Anaconda3 and how to investigate the cause.
What to do if No Python documentation found for ... appears in pydoc
Addressed "Python .h: No such file or directory" when installing uWSGI with Python 3.8
[Go 1.13] What to do when unexpected directory layout: appears
[openpyxl] What to do when IllegalCharacterError appears in pandas.DataFrame.to_excel
What to do when a warning appears around Python integration in Neovim's CheckHealth
What to do when "Invalid HTTP_HOST header" appears in Django
[Python] What to do when No module named'pyproj.datadir' appears when Exe is done with PyInstaller
When bus = smbus.SMBus (1) gets IOError: [Errno 2] No such file or directory when trying to start the GrovePi starter kit
pip install --upgrade pip will result in No such file or directory
What to do if Insecure Platform Warning appears when running Python
What to do when the value type is ambiguous in Python?
What to do when the warning "The environment is in consistent ..." appears in the Anaconda environment
NO MORE “cd: foo: No such file or directory”
What to do to get google spreadsheet in python
EC2 / Amazon Linux2: What to do if you get an "unable to execute'gcc': No such file or directory" error with pip install
What to do when xlrd.biffh.XLRDError: Unsupported format, or corrupt file: Expected BOF record;
What to do if NotADirectoryError: [Errno 20] Not a directory:'xdg-settings' appears in jupyter notebook
What I do when imitating embedded go in python
What to do when gdal_merge creates a huge file
What to do when "cannot import name xxx" [Python]
I want to do something in Python when I finish
What to do when you can't bind CaboCha to Python
What to do if you get `No kernel for language python found` in Hydrogen
What to do if you get an error when importing matplotlib in Python (Mac)
What to do if ʻarguments [0] .scrollIntoView ();` fails in python selenium
ImportError: No module What to do when you are told
What to do if you get Swagger-codegen in python and Import Error: No module named
What to do when no display name occurs when unittesting Python + Tkinter on Github Actions Memo
What to do with PYTHON release?
No such file or directory:'chromedriver': Resolve'chromedriver'
What to do if python says "fatal error:'stdio.h' file not found"
-bash: ./ {file name} .sh: /usr/bin/bash: bad interpreter: No such file or directory
What to do when UnicodeDecodeError occurs during read_csv in pandas (pd.read_table ())
[Beginner] What to do when "[Errno 2] File b'test.csv' does not exist: b'test.csv" is displayed when reading pandas csv
NameError: global name'dot_parser' is not defined and what to do when it comes up in python
[Memorandum] What to do when a warning appears after executing pip list
What to do if there is a decimal in python json .dumps
What to do if you can't find PDO in Laravel or CakePHP
How to do R chartr () in Python
What to do if you can't use scikit grid search in Python
What to do when pyinstaller: error: argument --add-binary: invalid add_data_or_binary value: appears
Import Error: libffi.so.6: cannot open shared object file: No such file or directory
In python + sqlite3 "OperationalError: no such column:"
[Docker] What to do when error Couldn't find the binary git appears
What to do if you get lost in file reference with FileNotFoundError
How to write what to do when an application is first displayed in Qt for Python with Designer
[Python] What to do when an error related to SSL authentication is returned
Cannot import cv2 (libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory)
What to do when "OS Error: [WinError 126] The specified module cannot be found" appears in import torch
[Python] What to do if you get a ModuleNotFoundError when importing pandas using Jupyter Notebook in Anaconda
After all, what should I use to do type comparisons in Python?
[OSX] [pyenv] What to do when an SSL error occurs in pip
[Note] How to deal with unicode error and No such file or directory (output table to excel file with pandas)
What to do when a warning message is displayed in pip list
[Memorandum] What to do when a warning appears after executing pip list
What to do when a warning message is displayed in pip list
Notes on what to do if "macOS 11 or later required!" Appears in Big Sur or pyarrow2.0.0 cannot be installed
bash: cannot create temp file for here-document: What to do when No space left on device is displayed
[Python] What to do if an error occurs in pip (pyinstaller, pyautogui, etc.)