These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

v2.86: "Couldn't open cache file"

user-513

Morning all,

[get_iplayer v2.86 over the border on Windows 8.1. Recently updated from v2.85]

When tring to download radio, either in get_iplayer command line or by PVR, I'm getting the error message:

Quote:Warning: Couldn't open cache file 'C:\folder location/.get_iplayer/radio.cache' for writing

Deleting and re-installing get_iplayer fixes it not. Get_iplayer can access and change the options file in the same folder. None of the files in that folder show hidden/read only/etc in windows file options.

Please, please help me get this fixed before I miss the next installement of THHGTTG.

Thank you.

user-30

The file does presumably exist though?

It is created by the refreshing of the index, so you could try deleting the file (if it exists) and using
Code:
get_iplayer --type=radio --refresh
to force an update/recreation of the file.

user-513

File does exist. Deleting it and --refresh creates new radio.cache file. Get same error message.

Ah... Sorry just noticed, I've given you an incomplete story. I get the
Quote:Warning: Couldn’t open cache file ‘C:\folder location/.get_iplayer/radio.cache’ for writing
message when I search by name using:
Quote:get_iplayer --type=radio "Programme Name"
but I then get search results.

However, when I try to download a file from the results using:
Quote:get_iplayer --type=radio --get 12345
I get another error message
Quote:Error: Could not create dir 'C:\Users\Username\folder location\Downloaded Radio': mkdir C:\Users\Username: Permission denied; Access is denied at get_player.pl line 4106.

If I try
Quote:get_iplayer --type=radio --get "Programme Name"
then I get a combination: the first error message, list of matching programmes, second error message.

user-2

To point out the obvious: check the permissions on your home folder. File/folder attributes are irrelevant here. Look at the Security tab in the Properties dialog for your home folder. If the permissions for your account don't show everything except "Special permissions" ticked in the "Allow" column, then you or something you installed has messed up the permissions. Specifically, from your description it sounds like the "Create Folders/Append Data" permission has been removed. If that is the case you would probably see a tick next to "Special permissions" in the Security tab permissions list for your account. If so, click "Advanced" to view the advanced permissions for your account. You can fix up the permissions in the advanced view, or you can also just tick "Allow" for "Full Control" for your account in the Security tab and apply the change. Either way, you'll probably get warnings that permissions can't be propagated to subfolders in the hidden AppData folder, which should be OK. If you're not familiar with manipulating folder permissions in Windows, Google is your friend. It's a bad thing if your home folder permissions were messed up, so you might want to first do a bit of research to see if something you installed was the culprit. get_iplayer never changes any permissions, so the problem lies elsewhere.

user-513

Folder permissions are on full control. No antivirus/sandbox software blocking access.

Tried something else. As I don't use the video, uninstalled all and reinstalled only get_iplayer, MPlayer and LAME.

Now both get_iplayer and PVR give me another error message:

Code:
INFO: No specified modes () available for this programme with version 'default'
(try using --modes=flashaaclow,rtspaaclow,wma)
ERROR: Failed to record 'Programe name (b007jm4s

)'

Code:
--prefs-add --modes=flashaaclow
=> need rtmpdump

install rtmpdump...
Code:
WARNING: Required ffmpeg/avconv does not exist - not converting flv file
ERROR: Could not create dir 'C:\Users\Username\Documents\Downloaded Radio': mkdir
C:\Users\Username: Permission denied; Access is denied at get_iplayer.pl line 4106.



install ffmpeg...
Code:
ERROR: Could not create dir 'C:\Users\Username\Documents\Downloaded Radio': mkdir
C:\Users\Username: Permission denied; Access is denied at get_iplayer.pl line 4106.



remove rtmpdump...
can't access flashacclow - only available version

reinstall rtmpdump...
Code:
ERROR: Could not create dir 'C:\Users\Username\Documents\Downloaded Radio': mkdir C:\Users\Username: Permission denied; Access is denied at get_iplayer.pl line 4106.

Hmmm... rtmpdump causing problems?

THanks for your patience with this btw. Good to know there's help just a keyboard away!

user-2

Don't waste any more time with piecemeal installations. You need rtmpdump and ffmpeg no matter what. rtmpdump is not the problem. The errors won't be generated without rtmpdump because get_iplayer can't download anything without it. Permissions are the problem. Check permissions on C:\Users\Username\Documents and C:\Users\Username\Documents\Downloaded Radio. They should be inherited from your home folder, but there is no way for us to know what you have done to your machine. Try another output directory somewhere outside your home folder. If you selected the output directory in the installer, make sure you are logged in with the account used to install get_iplayer. Better yet, uninstall get_iplayer, back up and delete your profile directory (%USERPROFILE%\.get_iplayer), then reinstall get_iplayer and accept the defaults, include output folder (DESKTOP\iPlayer Recordings). If that works, then start rebuilding your settings from the backup.

user-513

Thank you! Got it. Moved output folder to c:\ (avoiding Users altogether) and download works.

In the end though, it wasn't the permissions, it was that 'Username' was in cyrillic (long story) which I didn't think to say - sorry. Didn't cause a problem in previous version though. I still get
Code:
Warning: Couldn’t open cache file ‘C:\folder location/.get_iplayer/radio.cache’ for writing
when using the PVR.

What functions am I losing? I could change the user name (google is indeed my friend) but if I don't have too...

Sorry for being a pain, thanks again for your time and help!

user-2

Some details wouldn't go amiss. What is your system locale? What is the active code page (run
Code:
chcp
in get_iplayer console window)? Is the
Code:
output
setting in your options file encoded properly according to those settings? Does it work if you enter the cyrillic output directory on the command line with
Code:
--output
instead of reading it from the options file?

Try the HEAD version of get_iplayer:

https://squarepenguin.co.uk/wiki/install...itheadwin/

Test it with your original configuration (output directory under cyrillic home folder, etc). I reverted some encoding-related changes from 2.86 that might have had some effect in this case.

If that doesn't work, try rolling back to the previous version. Follow the above instructions, but use this download URL instead:

https://raw.github.com/get-iplayer/get_i...et_iplayer

user-513

I changed the User folder from Username(cyrillic) to Username(latin) and now all works fine, command line and pvr.

So, thank you for the help! In answer to your questions anyway:

OS: Win8.1 64bit
What is your system locale? Russia
What is the active code page? 866
Is the
Code:
output
setting in your options file encoded properly according to those settings? Don't know how to check this. If I open 'options' in notepad/notepad++ the CyUsername is ... cryptic, not cyrillic. Changing the encoding UTF-8/ANSI (notepad++) Western/Cyrillic (notepad) changes the lettering, but none are readable.

Does it work if you enter the cyrillic output directory on the command line with
Code:
--output
instead of reading it from the options file? No. Neither changing the destination in the 'output' file via "--output" nor editing via notepad worked.

> Try the HEAD version of get_iplayer. Test it with your original configuration (output directory under cyrillic home folder, etc).
As I have changed Username, I created new account in cyrillic [CyUsername] and changed --output to C:\Users\CyUsername.
Trying HEAD version get:
Code:
ERROR: Could not create dir 'C:\Users\├Т├е├▒├▓├и├н├г\Documents\Downloaded Radio': mkdir C:\Users\├Т├е├▒├▓├и├н├г: Permission denied; Access is denied at get_iplayer.pl line 4103.

>If that doesn’t work, try rolling back to the previous version.
Code:
ERROR: Could not create dir 'C:\Users\╥хёЄшэу\Documents\Downloaded': mkdir C:\Users\╥хёЄшэу\Documents\Downloaded: Permission denied; Access is denied at get_iplayer.pl line 4033.

Tried 2.84:
Code:
ERROR: Could not create dir 'C:\Users\╥хёЄшэу\Documents\Downloaded': mkdir C:\Users\╥хёЄшэу\Documents\Downloaded: Permission denied; Access is denied at get_iplayer.pl line 4033.

All above versions worked fine when output points to Username (latin). I'm happy to try something else if it helps you, but as I said, changing the Account folder name to something less foreign has solved it for me.

user-2

Both HEAD and v2.85, as well as 2.86 with proper modification, worked for me with those system settings and an output directory containing cyrillic characters, both on command line and in options file. I also noticed Notepad++ didn't display cyrillic characters correctly for some reason, but checking the character values showed they had been saved correctly. I don't know where our methods differed, but it's not worth wasting any more time on it.

get_iplayer doesn't take account of Windows code pages, but in prior versions any values from the options file were passed through without any decoding. I think the root of the problem was a change in 2.86 that implicitly assumed the "output" value in options file would contain only Latin characters (to oversimplify a bit). The cyrillic output directory placed in your options file with a previous version was being decoded into garbage by 2.86, so Perl choked.

These forums are archived

See this post for further info