Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Permission denied at /usr/share/perl5/site_perl/WWW/StrawViewer.pm line 381. #11

Closed
zenny opened this issue Apr 18, 2020 · 5 comments
Closed

Comments

@zenny
Copy link

zenny commented Apr 18, 2020

Hi @trizen

I am at:

$ straw-viewer --version
CLI Straw Viewer 0.0.3

But straw-viewer started spilling out the following error from this morning (was working alright till yesterday, fyi):

$ straw-viewer --debug coronavirus
** GET https://invidio.us/api/v1/search?maxResults=20&part=snippet&q=coronavirus&type=video ==> 200 OK (1s)
open('/tmp/straw-viewer/327c69828d3a7e7ae9ab52c2d15b9b47', 'w'): Permission denied at /usr/share/perl5/site_perl/WWW/StrawViewer.pm line 381.

[!] No video results!

=>> Select one or more videos to play (:h for help)
> ^C

Line 381 in /usr/share/perl5/site_perl/WWW/StrawViewer.pm reads like:

    my $response   = $self->{lwp}->get($url, %lwp_header);

Any clue?

Cheers and stay safe,
/z

@trizen trizen closed this as completed in 820ebc7 May 16, 2020
@zenny
Copy link
Author

zenny commented May 26, 2020

@trizen This issued popped up once again from this afternoon despite pulling the master repo just a while ago and recompiled, appears like problem with the authentication issue:

[zenny@localhost straw-viewer]$ git pull
Already up to date.

$ straw-viewer --debug coronavirus
** GET https://invidio.us/api/v1/search?maxResults=20&part=snippet&q=coronavirus&type=video ==> 200 OK (1s)
open('/tmp/straw-viewer/a966bb046d7eef5687653eeb3f471fbe', 'w'): Permission denied at /usr/share/perl5/site_perl/WWW/StrawViewer.pm line 381.

[!] No video results!

=>> Select one or more videos to play (:h for help)
> 

Cheers and stay safe,
/z

@trizen
Copy link
Owner

trizen commented May 26, 2020

Try removing the config file of straw-viewer. Or simply change the cache directory to some other directory where you have read and write permissions.

@zenny
Copy link
Author

zenny commented May 27, 2020

Try removing the config file of straw-viewer. Or simply change the cache directory to some other directory where you have read and write permissions.

@trizen Thanks for the prompt answer.

/tmp has r+w permissions and not an issue:

$ touch /tmp/straw-viewer/newfile
$ ls -la /tmp/straw-viewer
total 4.0K
drwxr-xr-x 2 zenny-nowm zenny-nowm   80 May 27 13:30 .
drwxrwxrwt 8 root       root        220 May 27 13:30 ..
-rw-r--r-- 1 zenny-nowm zenny-nowm 1.1K May 27 13:26 b9d2edc9e6c3cd6383a6d5597166e958
-rw-r--r-- 1 zenny-nowm zenny-nowm    0 May 27 13:30 newfile

removing straw-viewer.conf gave and output:

]$ straw-viewer --debug coronavirus
** GET https://invidio.us/api/v1/search?maxResults=20&part=snippet&q=coronavirus&type=video ==> 200 OK (1s)

[!] No video results!

=>> Select one or more videos to play (:h for help)
> 

Both ways it didn't work, fyi!

@trizen
Copy link
Owner

trizen commented May 27, 2020

I cannot reproduce the "permission denied" issue, but I can reproduce the "no video results" issue.

Sometimes, invidio.us gets too crowded and fails to work. When this happens, we can change the API host to some other instance of invidious, such us https://invidious.snopyta.org/

The available instances are listed at: https://instances.invidio.us/

straw-viewer --api-host=invidious.snopyta.org --debug coronavirus

This can be changed permanently, by setting in the config-file:

  api_host => "https://invidious.snopyta.org",

@zenny
Copy link
Author

zenny commented May 27, 2020

straw-viewer --api-host=invidious.snopyta.org --debug coronavirus

Yep, the latter with --api-host flag works as desired. Thanks for the pointer to list of api-hosts. Fantastic work, @trizen !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants