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

Cannot add image when using absolute paths on Windows #219

Closed
Sirove opened this issue Jun 26, 2018 · 5 comments
Closed

Cannot add image when using absolute paths on Windows #219

Sirove opened this issue Jun 26, 2018 · 5 comments

Comments

@Sirove
Copy link

Sirove commented Jun 26, 2018

It works fine if I open the command prompt inside the folder with the picture and mp3 file:

eyeD3 --add-image "Test.jpg":FRONT_COVER "Test.mp3"

But when using an ansolute path to the image it doesn't work:

eyeD3--add-image "C:\Users\Admin\Desktop\Test\Test.jpg":FRONT_COVER "C:\Users\Admin\Desktop\Test\Test.mp3"
eyeD3: error: argument --add-image: invalid pic type: \Syncthing\Podcasts\HiddenBrain\Hidden Brain.jpg
@nicfit
Copy link
Owner

nicfit commented Jun 27, 2018

I don't have Windows, but it seems like maybe ':' special. FRONT_COVER is meant to be the "picture type", not sure why the command line parsing is different.

@Sirove
Copy link
Author

Sirove commented Jun 27, 2018

I also tried using environment variables like %UserProfile%\Desktop\Test\Test.jpg but still the same error...

@chamatht
Copy link
Contributor

chamatht commented Jun 27, 2018

This issue is unique to windows.
The issue can be resolved by adding a single \ after the drive letter.

  • eyeD3 --add-image C\:\Users\Admin\Desktop\Test\Test.jpg:FRONT_COVER C:\Users\Admin\Desktop\Test\Test.mp3

if you're using a url then add a single \ after http.

  • eyeD3 --add-image http\://www.examaple.com/Test.jpg:FRONT_COVER C:\Users\Admin\Desktop\Test\Test.mp3

more info

After some testing and debugging, I found out that python argparser in windows doubles the number of \. This happens only on windows.

On eyedD3 docs, it's mentioned how to avoid this issue with \\. It only works with macOS and linux. For windows adding one \ is enough, because argparser doubles it.
May be it's a good idea to mention this in the docs for windows users.

@Sirove
Copy link
Author

Sirove commented Jun 27, 2018

It works! Thanks!

chamatht added a commit to chamatht/eyeD3 that referenced this issue Jun 27, 2018
…he issue nicfit#219]

To avoid conflicts when --add-image <url> is used, a solution is given in docs.
It only works for linux/macos. Therefore a seperate example for windows is added.
nicfit pushed a commit that referenced this issue Jul 23, 2018
…he issue #219] (#220)

To avoid conflicts when --add-image <url> is used, a solution is given in docs.
It only works for linux/macos. Therefore a seperate example for windows is added.
@nicfit nicfit closed this as completed Jul 23, 2018
@elcoso
Copy link

elcoso commented Aug 16, 2020

2020- still broken and the example you give is only for url images not local. If I use "C\:" the path is wrong and doesnt work.

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

No branches or pull requests

4 participants