-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: [Errno 2] No such file or directory. Files exist can touch and ls. #18
Comments
Would you mind sending the log file instead? |
Of Course Sorry, Was late when I was messing with this. |
Thank you for the logs file! I had a first look and it doesn't seem you have any misconfiguration, and the script does seem to be working with other files, correct? I will be able to pay more attention to this issue at the beginning of the week, I'm currently in between night shifts and my free time (and brain power) is limited. |
It does not appear to be move any files
|
Also don't worry about it. I assume your NHS, don't be stressing about hobby bugs |
Guilty! I've updated the script ever so slightly:
That is probably it for today. Also...thank you so so much! ❤️ |
Afraid, It still thinks the file doesn't exist. It's hardly as straight forward as it not escaping the ( ) or [ ]. So the behaviour is the same, It trys the first file and doesn't progress. I git pulled before I ran. |
So as far I understood the file My bad about the exiting, I forgot that logging.critical also halt the script, now it should not stop according to the logic. I've also quickly added another check when calculating the free space. Time to go for real this time! |
It would be in the user. /mnt/user/TV. cache is a practically empty zpool can confirm the script moves nothing to it. |
First file fails, doesn't try the rest. All the files exist on the array under user. |
I don't think I'm gonna be able to do much today or tomorrow but I'm actively thinking on how to solve this issue. When the debug mode is off, the script is designed to exit in case it encounters an error during the moving process. I've removed this logic in this version of the file plexache. I find it odd that some other users, including myself (though I may be biased), use the script without any issues. I'm thinking openly, and the only difference I can think of is the zpool. However, I cannot confirm this since I don't know the exact setup of other users, so they might actually use one already. Regardless, whether using zpool or not, it should be completely transparent to the script and shouldn't matter at all, that's why I'm not focusing on this but I just wanted to share this intrusive thought. |
Well-aware coding is 99% in the brain, not the computer. Ran the new file same result. To test that theory you have I've run the script with it pointing at a disk on the array rather than the cache. Still wouldn't work, however I removed the () and [] from two of the directory and they no longer trigger the error....but there does seem to be an issue with the zpool. See attached when going to disk13 (xfs) it appears to work with an estimated move size. With the target being ingress (zpool) It tells me there are no files to move. brackets.removed.debug.to.zpool.log |
Good morning! Thank you for the testing! It made me think a bit. Apparently I have to properly handle zpools with the script, so I have to test if any of the sources and/or destination are zpools and act accordingly. This will take a few hours and testing, unfortunately, I will work blind on it because I have no zpool in my Unraid system. So I beg for your patience. Regarding the parenthesis, well, now I've wrapped the folder/file name properly, so it should not give any more issues. I will work on it between later tonight or tomorrow. Now that I have a potential solution in my mind, I'm quite excited to see how it turns out and improve the script further. I'll keep you updated on my progress! |
So I've made some edits but I cannot test it so I'm not sure it will work: Please let me know if it works at all! Forgot to say, this is the new version: zfs |
Ran it, No logs were produced. Still getting the file error.
|
Will "zfs clone" and "zfs destroy" work of the array is XFS? |
I can't understand why the script hasn't written the log file, I did not touch that at all, and even in the event of an error during the zfs operation, it will still produce a log entry, also I can see it did end the reach as it printed the execution time, which is only invoked at the end of the script.
The script will use the zfs clone and destroy commands only when the file system is ZFS, otherwise it will use 'normal' commands for moving files. |
Before running the last updated version, please install psutil (pip install psutil) because I'm using that to check for the free space as it is more system agnostic and should work on ZFS too. |
Syntax error and my pythons not good enough to figure it out :P
|
Sorry if I took so long to actually answer. My bathroom decided was a good time to leak some water. Either way I have no idea what the hell happened in my code, it was spamming me with a very generic module error even though I did test it. I've now basically rewritten the zfs logic from scratch, tested the script and it works, but as usual, I cannot confirm the zfs logic actually works. Thank you for your patience! |
Absolutely no worries, I have zen practice on Mondays so I was limited in
my ability to test anything.
…On Tue 1 Aug 2023 at 19:39, Emanuele B. ***@***.***> wrote:
Sorry if I took so long to actually answer. My bathroom decided was a good
time to leak some water.
Either way I have no idea what the hell happened in my code, it was
spamming me with a very generic module error even though I did test it.
I've now basically rewritten the zfs logic from scratch, tested the script
and it works, but as usual, I cannot confirm the zfs logic actually works.
Thank you for your patience!
—
Reply to this email directly, view it on GitHub
<#18 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVOY6JEUZPHG2KIAYTN7GLXTFEPRANCNFSM6AAAAAA22VMGOQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Still no logs
|
So no log at all? Like not even interrupted? |
No logs from either script or branch? This is new. Otherwise still chocking don't the file |
That is so odd. So I guess if you run plexcache_exclude_file.py the log will work? The only difference between the zfs one is exactly the zfs logic, otherwise is line by line identical. |
No log from that either, nor when I switch back to main....odd there where logs. All the permissions are nobody and the scripts are root. |
So you are not getting any logs at all? Have you tried setting another folder for the logs?
|
. |
It happens, at least is sorted! |
Most recent run from the most recent push. |
Thank you for testing. |
plexcache_log_latest.log |
So the error seems to happen when checking for the total size of the files to move, I've swapped the function so instead of os.path.getsize() I'm using os.stat() instead that should be more system agnostic. |
plexcache_log_latest.log |
So it appears to have issues when calculating the total size of the files... |
still No such file or directory: |
Was this actually moved? I suppose your /user0/ which refers to the actual array, it's not zfs, right? Not that it matter for the end goal but I want to understand why is giving errors if it isn't zfs... |
It would appear yes that is on Ingress, so it did move. So that's progress! \0/ |
That's good, but for what I can see it used the "normal" logic rather than the zfs one to move that file. I'm not 100% sure but judging by the fact I didn't put a logging message on that logic (all the other zfs ones have it)... Unfortunately work calls me back, I will have time again in the weekend and hopefully we'll manage a working script! |
plexcache_log_latest.log |
Good evening!
Let me know whenever you can 🤞🏻 |
So there are still issues, definitely. Thank you for your patience, once again |
More logs |
Hey there! I'm really sorry for the wait. I promise I haven't forgotten about the project or your issue in specific. Life's been a whirlwind lately with work, family, and soon, university stuff. I'll jump back in as soon as I can. |
No worries |
hey @bexem does this error stop the script from working? Im running into this issue too and nothing is moving on my server |
I am getting the bellow. Very confused as I can see the files. Running on Unraid
`root@TheLibrary:/mnt/user/scripts/PlexCache# python3 plexcache.py
*** PlexCache ***
Debug mode is active, NO FILE WILL BE MOVED.
Fetching DuzAwe's onDeck media...
Editing file paths...
Fetching subtitles...
Fetching watched media...
Fetching DuzAwe's watched media...
Editing file paths...
Fetching subtitles...
Nothing to move to array
Error: [Errno 2] No such file or directory: "/mnt/user/TV/It's Always Sunny in Philadelphia (2005) [TVdb-75805]/Season 13/It's.Always.Sunny.in.Philadelphia.-.S13E03.-.The.Gang.Beats.Boggs-.Ladies.Reboot.WEBDL-1080p.mkv"
root@TheLibrary:/mnt/user/scripts/PlexCache# nano plexcache_settings.json
root@TheLibrary:/mnt/user/scripts/PlexCache# python3 plexcache.py
*** PlexCache ***
Fetching DuzAwe's onDeck media...
Editing file paths...
Fetching subtitles...
Loading watched media from cache...
Nothing to move to array
Error: [Errno 2] No such file or directory: "/mnt/user/TV/It's Always Sunny in Philadelphia (2005) [TVdb-75805]/Season 13/It's.Always.Sunny.in.Philadelphia.-.S13E03.-.The.Gang.Beats.Boggs-.Ladies.Reboot.WEBDL-1080p.mkv"
root@TheLibrary:/mnt/user/scripts/PlexCache# ^C
root@TheLibrary:/mnt/user/scripts/PlexCache# ^C
root@TheLibrary:/mnt/user/scripts/PlexCache# ls /mnt/user/TV/It's Always Sunny in Philadelphia (2005) [TVdb-75805]/Season 13/
The text was updated successfully, but these errors were encountered: