[GH-ISSUE #57] No such file or directory #507

Closed
opened 2026-03-13 21:43:15 +03:00 by kerem · 6 comments
Owner

Originally created by @quintendewilde on GitHub (Jul 14, 2020).
Original GitHub issue: https://github.com/alexal1/Insomniac/issues/57

[07/14 19:54:31] Open Instagram app
[07/14 19:54:33] Sleep for 2 seconds
[07/14 19:54:35] Press profile
[07/14 19:54:42] Failed to get username
Traceback (most recent call last):
File "insomniac.py", line 369, in
main()
File "insomniac.py", line 81, in main
storage = Storage(session_state.my_username)
File "/home/pi/Insomniac/src/storage.py", line 17, in init
os.makedirs(my_username)
File "/usr/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
FileNotFoundError: [Errno 2] No such file or directory: ''

Originally created by @quintendewilde on GitHub (Jul 14, 2020). Original GitHub issue: https://github.com/alexal1/Insomniac/issues/57 [07/14 19:54:31] Open Instagram app [07/14 19:54:33] Sleep for 2 seconds [07/14 19:54:35] Press profile [07/14 19:54:42] Failed to get username Traceback (most recent call last): File "insomniac.py", line 369, in <module> main() File "insomniac.py", line 81, in main storage = Storage(session_state.my_username) File "/home/pi/Insomniac/src/storage.py", line 17, in __init__ os.makedirs(my_username) File "/usr/lib/python3.7/os.py", line 221, in makedirs mkdir(name, mode) FileNotFoundError: [Errno 2] No such file or directory: ''
kerem 2026-03-13 21:43:15 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@lucianoshl commented on GitHub (Jul 14, 2020):

same here

<!-- gh-comment-id:658414132 --> @lucianoshl commented on GitHub (Jul 14, 2020): same here
Author
Owner

@alexal1 commented on GitHub (Jul 15, 2020):

@quintendewilde @lucianoshl thanks for reporting, check on this branch please https://github.com/alexal1/Insomniac/tree/fix_no_such_file_or_directory

<!-- gh-comment-id:659024316 --> @alexal1 commented on GitHub (Jul 15, 2020): @quintendewilde @lucianoshl thanks for reporting, check on this branch please https://github.com/alexal1/Insomniac/tree/fix_no_such_file_or_directory
Author
Owner

@quintendewilde commented on GitHub (Jul 25, 2020):

How do I combine this with my code?
@alexal1

`-------- START: 2020-07-25 18:07:17.627523 --------
[07/25 18:07:17] Open Instagram app
[07/25 18:07:20] Sleep for 1 second
[07/25 18:07:21] Press profile
[07/25 18:08:42] Failed to get username
[07/25 18:08:42] You have 60 followers so far.
Traceback (most recent call last):
File "insomniac.py", line 335, in
main()
File "insomniac.py", line 83, in main
storage = Storage(session_state.my_username)
File "/home/pi/Insomniac/src/storage.py", line 16, in init
if not os.path.exists(my_username):
File "/usr/lib/python3.7/genericpath.py", line 19, in exists
os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

<!-- gh-comment-id:663872216 --> @quintendewilde commented on GitHub (Jul 25, 2020): How do I combine this with my code? @alexal1 `-------- START: 2020-07-25 18:07:17.627523 -------- [07/25 18:07:17] Open Instagram app [07/25 18:07:20] Sleep for 1 second [07/25 18:07:21] Press profile [07/25 18:08:42] Failed to get username [07/25 18:08:42] You have 60 followers so far. Traceback (most recent call last): File "insomniac.py", line 335, in <module> main() File "insomniac.py", line 83, in main storage = Storage(session_state.my_username) File "/home/pi/Insomniac/src/storage.py", line 16, in __init__ if not os.path.exists(my_username): File "/usr/lib/python3.7/genericpath.py", line 19, in exists os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
Author
Owner

@alexal1 commented on GitHub (Jul 28, 2020):

@quintendewilde seems that the script cannot read your username from the profile screen. Probably you have different UI in your app. Are you sure that you've got the latest Instagram version? If yes, could you do a uiautomatorviewer screenshot and attach it here?

How do I combine this with my code?

Please don't mix the code with yours while we're debugging: I can't debug the code I don't see.

<!-- gh-comment-id:665132291 --> @alexal1 commented on GitHub (Jul 28, 2020): @quintendewilde seems that the script cannot read your username from the profile screen. Probably you have different UI in your app. Are you sure that you've got the latest Instagram version? If yes, could you do a `uiautomatorviewer` screenshot and attach it here? > How do I combine this with my code? Please don't mix the code with yours while we're debugging: I can't debug the code I don't see.
Author
Owner

@quintendewilde commented on GitHub (Jul 28, 2020):

How do I achieve this uiautomatorviewer screenshot on raspberry pi or mac?
Because I have no windows available.

<!-- gh-comment-id:665188629 --> @quintendewilde commented on GitHub (Jul 28, 2020): How do I achieve this uiautomatorviewer screenshot on raspberry pi or mac? Because I have no windows available.
Author
Owner

@alexal1 commented on GitHub (Aug 1, 2020):

I will create post about using uiautomatorviewer soon.
As I understood, updating Instagram solved the problem?

<!-- gh-comment-id:667525171 --> @alexal1 commented on GitHub (Aug 1, 2020): I will create post about using **uiautomatorviewer** soon. As I understood, updating Instagram solved the problem?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Insomniac#507
No description provided.