Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FileNotFoundError: [Errno 2] ?
#9
(Sep-23-2019, 02:45 PM)Gribouillis Wrote:
JohnnyCoffee Wrote:Have a comment on the code above to know what you did ?
I raised a new exception to know how python interpretes the .. directory at the moment the error occurs.

This was the error generated :

Traceback (most recent call last):
File "/home/assistant/PycharmProjects/pycoderun/syscore/wsp_application.py", line 13, in wsm_path
ws_listdir = os.listdir('../application/controllers')
FileNotFoundError: [Errno 2] No such file or directory: '../application/controllers'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "coderun.py", line 16, in coderun
return [WspProtected.wsm_dir(ws_path)]
File "/home/assistant/PycharmProjects/pycoderun/syscore/wsp_protected.py", line 7, in wsm_dir
if ws_path == WspApplication.wsm_path():
File "/home/assistant/PycharmProjects/pycoderun/syscore/wsp_application.py", line 16, in wsm_path
raise RuntimeError(Path('..').resolve()) from exc
RuntimeError: /home/assistant/PycharmProjects
127.0.0.1 - - [23/Sep/2019 12:48:20] "GET / HTTP/1.1" 500 59
Traceback (most recent call last):
File "/home/assistant/PycharmProjects/pycoderun/syscore/wsp_application.py", line 13, in wsm_path
ws_listdir = os.listdir('../application/controllers')
FileNotFoundError: [Errno 2] No such file or directory: '../application/controllers'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "coderun.py", line 16, in coderun
return [WspProtected.wsm_dir(ws_path)]
File "/home/assistant/PycharmProjects/pycoderun/syscore/wsp_protected.py", line 7, in wsm_dir
if ws_path == WspApplication.wsm_path():
File "/home/assistant/PycharmProjects/pycoderun/syscore/wsp_application.py", line 16, in wsm_path
raise RuntimeError(Path('..').resolve()) from exc
RuntimeError: /home/assistant/PycharmProjects
127.0.0.1 - - [23/Sep/2019 12:48:20] "GET /favicon.ico HTTP/1.1" 500 59
Reply


Messages In This Thread
FileNotFoundError: [Errno 2] ? - by JohnnyCoffee - Sep-22-2019, 02:03 AM
RE: FileNotFoundError: [Errno 2] ? - by Gribouillis - Sep-22-2019, 08:27 AM
RE: FileNotFoundError: [Errno 2] ? - by Gribouillis - Sep-22-2019, 01:08 PM
RE: FileNotFoundError: [Errno 2] ? - by Gribouillis - Sep-23-2019, 04:48 AM
RE: FileNotFoundError: [Errno 2] ? - by Gribouillis - Sep-23-2019, 02:45 PM
RE: FileNotFoundError: [Errno 2] ? - by JohnnyCoffee - Sep-23-2019, 03:51 PM
RE: FileNotFoundError: [Errno 2] ? - by Gribouillis - Sep-23-2019, 03:57 PM
RE: FileNotFoundError: [Errno 2] ? - by Gribouillis - Sep-24-2019, 06:49 AM
RE: FileNotFoundError: [Errno 2] ? - by Gribouillis - Sep-24-2019, 05:59 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020