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

failed to get cache path #86

Closed
max-ishere opened this issue Feb 19, 2023 · 7 comments
Closed

failed to get cache path #86

max-ishere opened this issue Feb 19, 2023 · 7 comments

Comments

@max-ishere
Copy link
Contributor

I believe the error:

$ swww img example.gif
failed to get cache path: failed to create cache_path: No such file or directory (os error 2)

is caused by utils/communication.rs:324.

I tried to create .cache/swww but it still gives me this error.

$ stat $HOME/.cache/swww
  File: /home/max_ishere/.cache/swww
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 254,2	Inode: 395962      Links: 2
Access: (0755/drwxr-xr-x)  Uid: ( 1000/max_ishere)   Gid: ( 1000/max_ishere)
Access: 2023-02-19 17:20:30.772317103 +0200
Modify: 2023-02-19 17:20:30.772317103 +0200
Change: 2023-02-19 17:20:30.772317103 +0200
 Birth: 2023-02-19 17:20:30.772317103 +0200

I dont know if this is related but after calling swww clear and then displaying a gif (swww img example.gif) is hangs on the first frame for quite some time. Would be nice if the first frame would only appear after swww is ready to play the entire gif.

@max-ishere
Copy link
Contributor Author

$ swww --version
swww 0.7.2

@LGFae
Copy link
Owner

LGFae commented Feb 19, 2023

Do you have $XDG_CACHE_HOME declared? That error message is atrocious btw, I should have made it print which path was attempted...

after calling swww clear and then displaying a gif (swww img example.gif) is hangs on the first frame for quite some time

Unrelated. There's no easy way around this. At best we can move the "hanging" to the client instead. I'll think about it.


EDIT: by the way, $HOME/.cache/swww should be a directory, not a file. Maybe try seeing if that helps?

@max-ishere
Copy link
Contributor Author

Do you have $XDG_CACHE_HOME declared? That error message is atrocious btw, I should have made it print which path was attempted...

I had really good experience with anyhow. It supports traceback and may display errors better.

after calling swww clear and then displaying a gif (swww img example.gif) is hangs on the first frame for quite some time

Unrelated. There's no easy way around this. At best we can move the "hanging" to the client instead. I'll think about it.

I'm building a login animation that has a 2s animation and then a static image. And the first frame of the GIF ruins the feel. I can fix it by replacing it with black or something.

EDIT: by the way, $HOME/.cache/swww should be a directory, not a file. Maybe try seeing if that helps?

Yeah it is a direrctory... idk. I think it didnt happen before? Or maybe i didnt notice. I already tried AUR swww-git, but same behavior.

@max-ishere
Copy link
Contributor Author

max-ishere commented Feb 19, 2023

And XDG dir has nothing to do with it because if it was the issue it would return here:
https://github.com/Horus645/swww/blob/77d5b9cd7c3c5649df190ceead8288e0fa4af2b6/utils/src/communication.rs#L307


edit: but no, i dont have xdg cache var defined.

@max-ishere
Copy link
Contributor Author

It was a missing... 🥁 Slash!

failed to get cache path: failed to create cache_path "/home/max_ishere.cache/swww": No such file or directory (os error 2)
                                                                       ^

@max-ishere
Copy link
Contributor Author

I'd guess the best thing to do would be to .push() the path

@max-ishere
Copy link
Contributor Author

#88 Should fix this

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

No branches or pull requests

2 participants