Skip to content
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

Warning and Error logs in iOS #25672

Closed
fangyuxi opened this issue Jun 15, 2020 · 4 comments
Closed

Warning and Error logs in iOS #25672

fangyuxi opened this issue Jun 15, 2020 · 4 comments

Comments

@fangyuxi
Copy link

@fangyuxi fangyuxi commented Jun 15, 2020

Checklist

  • [ x] I've verified that I'm running youtube-dl version 2020.06.06
  • [ x] I've checked that all provided URLs are alive and playable in a browser
  • [ x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • [ x] I've searched the bugtracker for similar bug reports including closed ones
  • [ x] I've read bugs section in FAQ

Verbose log

[0;33mWARNING:�[0m Writing cache to u'/private/var/mobile/Containers/Data/Application/14660BAA-0E13-42BD-987F-124A7CE1D113/.cache/youtube-dl/youtube-sigfuncs/js_16a691a1_109.json' failed: Traceback (most recent call last):
  File "/var/mobile/Containers/Data/Application/14660BAA-0E13-42BD-987F-124A7CE1D113/Documents/lib_root/project/youtube_dl/cache.py", line 49, in store
    os.makedirs(os.path.dirname(fn))
  File "/Users/rkm/projects/beeware/Python-Apple-support/2.7/build/iOS/Python-2.7.12-iphonesimulator.x86_64/dist/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/Users/rkm/projects/beeware/Python-Apple-support/2.7/build/iOS/Python-2.7.12-iphonesimulator.x86_64/dist/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/Users/rkm/projects/beeware/Python-Apple-support/2.7/build/iOS/Python-2.7.12-iphonesimulator.x86_64/dist/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 1] Operation not permitted: '/private/var/mobile/Containers/Data/Application/14660BAA-0E13-42BD-987F-124A7CE1D113/.cache'

�[0;33mWARNING:�[0m Writing cache to u'/private/var/mobile/Containers/Data/Application/14660BAA-0E13-42BD-987F-124A7CE1D113/.cache/youtube-dl/youtube-sigfuncs/js_16a691a1_105.json' failed: Traceback (most recent call last):
  File "/var/mobile/Containers/Data/Application/14660BAA-0E13-42BD-987F-124A7CE1D113/Documents/lib_root/project/youtube_dl/cache.py", line 49, in store
    os.makedirs(os.path.dirname(fn))
  File "/Users/rkm/projects/beeware/Python-Apple-support/2.7/build/iOS/Python-2.7.12-iphonesimulator.x86_64/dist/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/Users/rkm/projects/beeware/Python-Apple-support/2.7/build/iOS/Python-2.7.12-iphonesimulator.x86_64/dist/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/Users/rkm/projects/beeware/Python-Apple-support/2.7/build/iOS/Python-2.7.12-iphonesimulator.x86_64/dist/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 1] Operation not permitted: '/private/var/mobile/Containers/Data/Application/14660BAA-0E13-42BD-987F-124A7CE1D113/.cache'

Description

I use youtube-dl in iOS and call youtube-dl through Python-Apple-Support. So far, it can be used perfect, but it will generate warning and error logs. I don’t know what the reason is? Are some of my options not set correctly? ? These logs are output on the real device.

These logs look like youtube-dl is writing to the cache in some directories, but the written directories do not have permissions. Are some APIs able to set other paths?

I found this option --no-cache-dir but I don't know how to set it programmatically.

Best Regards.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 15, 2020

You have no permissions to create directory .cache in your ~.

@dstftw dstftw closed this Jun 15, 2020
@fangyuxi
Copy link
Author

@fangyuxi fangyuxi commented Jun 15, 2020

@dstftw Yes I know that, is there any api to change the path when programming ?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 15, 2020

Set XDG_CACHE_HOME env variable.

@fangyuxi
Copy link
Author

@fangyuxi fangyuxi commented Jun 17, 2020

@dstftw Thank you. It works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.