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

Emojis in folder names not supported on MS Windows #340

Open
Binnette opened this issue May 30, 2023 · 3 comments
Open

Emojis in folder names not supported on MS Windows #340

Binnette opened this issue May 30, 2023 · 3 comments
Labels
bug Existing bug

Comments

@Binnette
Copy link

Bug description

I have emojis in the name of my albums folders. When I run thumbsup I get those errors:

2023-05-30T12:26:44.041Z thumbsup:error Error processing 2019-06-05 🛶 Boat/HJYL6278.jpg -> media\large\2019-06-05 🛶 Boat\HJYL6278.jpg
2023-05-30T12:26:44.041Z thumbsup:error Error: Command failed: gm identify: Unable to open file (C:\Users\Binnette\Pictures\TestGallery\2019-06-05 ?? Boat\HJYL6278.jpg) [Invalid argument].
2023-05-30T12:26:44.041Z thumbsup:error gm identify: Request did not return an image.
2023-05-30T12:26:44.041Z thumbsup:error 
2023-05-30T12:26:44.042Z thumbsup:error Error processing 2019-06-05 🛶 Boat/HJYL6278.jpg -> media\small\2019-06-05 🛶 Boat\HJYL6278.jpg
2023-05-30T12:26:44.042Z thumbsup:error Error: Command failed: gm identify: Unable to open file (C:\Users\Binnette\Pictures\TestGallery\2019-06-05 ?? Boat\HJYL6278.jpg) [Invalid argument].
2023-05-30T12:26:44.042Z thumbsup:error gm identify: Request did not return an image.
2023-05-30T12:26:44.042Z thumbsup:error 

Steps to reproduce

  1. Add an emoji in the name of a folder like : 2019-06-05 🛶 Boat
  2. Run thumbup : thumbsup --input .\TestGallery\ --output OutGallery

I tested on:

  • Windows 10
  • Powershell 5.1
  • Node 16.17.0
  • thumbsup 2.17.1
  • GraphicsMagick 1.3.36
@Binnette Binnette added the bug Existing bug label May 30, 2023
@Binnette
Copy link
Author

I tested on Linux and it is working fine.

@rprieto
Copy link
Member

rprieto commented Dec 5, 2023

Hi, thanks for creating this issue.
Could you please try to run it on Windows again with --log trace?

I'd like to see the exact gm command that's executed.
Then we can see if there's a way to escape the filename arguments for the command to work.

@Binnette
Copy link
Author

Hi @rprieto, here you go:

PS C:\Test> thumbsup --input .\TestGallery\ --output OutGallery --log trace

  thumbsup:info ┌──────────────────────────────────────────────────────────────────────────┐
  thumbsup:info │                                                                          │
  thumbsup:info │  Thanks for using thumbsup!                                              │
  thumbsup:info │  Don't forget to check out the docs at https://thumbsup.github.io/docs.  │
  thumbsup:info │  Enjoy!                                                                  │
  thumbsup:info │                                                                          │
  thumbsup:info └──────────────────────────────────────────────────────────────────────────┘
  thumbsup:info  +0ms
  thumbsup:info Indexing folder [started] +1s
  thumbsup:info Differences between disk and index {
  unchanged: 0,
  added: 2,
  modified: 0,
  deleted: 0,
  skipped: 0,
  total: 2
} +0ms
  thumbsup:debug Split files into 2 batches for exiftool +0ms
  thumbsup:debug Calling exiftool with 1 files +0ms
  thumbsup:debug Calling exiftool with 1 files +103ms
  thumbsup:info → Indexing 1/2 (50%) +4s
  thumbsup:debug Exiftool exited with code 0 +0ms
  thumbsup:info → Indexing 2/2 (100%) +2s
  thumbsup:info Indexing folder [completed] +32ms
  thumbsup:info Resizing media [started] +1ms
  thumbsup:debug Comparing 2023-07-07 🛶 Boat/314026932.jpeg (1688390141000) and media\thumbs\2023-07-07 🛶 Boat\314026932.jpeg (0) +0ms
  thumbsup:debug Comparing 2023-07-07 🛶 Boat/314026932.jpeg (1688390141000) and media\small\2023-07-07 🛶 Boat\314026932.jpeg (0) +0ms
  thumbsup:debug Comparing 2023-07-07 🛶 Boat/314026932.jpeg (1688390141000) and media\large\2023-07-07 🛶 Boat\314026932.jpeg (0) +0ms
  thumbsup:debug Comparing 2023-07-07 🛶 Boat/314026932.jpeg (1688390141000) and media\large\2023-07-07 🛶 Boat\314026932.jpeg (0) +0ms
  thumbsup:debug Comparing 2023-07-07 🛶 Boat/298305336.jpeg (1689023692000) and media\thumbs\2023-07-07 🛶 Boat\298305336.jpeg (0) +1ms
  thumbsup:debug Comparing 2023-07-07 🛶 Boat/298305336.jpeg (1689023692000) and media\small\2023-07-07 🛶 Boat\298305336.jpeg (0) +0ms
  thumbsup:debug Comparing 2023-07-07 🛶 Boat/298305336.jpeg (1689023692000) and media\large\2023-07-07 🛶 Boat\298305336.jpeg (0) +0ms
  thumbsup:debug Comparing 2023-07-07 🛶 Boat/298305336.jpeg (1689023692000) and media\large\2023-07-07 🛶 Boat\298305336.jpeg (0) +1ms
  thumbsup:info Calculated required tasks { sourceFiles: 2, tasks: 6 } +0ms
  thumbsup:info Waiting [started] +4ms
  thumbsup:info Waiting [started] +0ms
  thumbsup:info Waiting [started] +1ms
  thumbsup:info Waiting [started] +0ms
  thumbsup:info Waiting [started] +0ms
  thumbsup:info Waiting [started] +0ms
  thumbsup:info Waiting [started] +0ms
  thumbsup:info Waiting [started] +0ms
  thumbsup:info Waiting [started] +0ms
  thumbsup:info Waiting [started] +0ms
  thumbsup:info Waiting [started] +0ms
  thumbsup:info Waiting [started] +0ms
  thumbsup:info Waiting [started] +0ms
  thumbsup:info Waiting [started] +1ms
  thumbsup:info Waiting [started] +0ms
  thumbsup:info Waiting [started] +0ms
  thumbsup:info Finished [title changed] +0ms
  thumbsup:info media\thumbs\2023-07-07 🛶 Boat\314026932.jpeg [title changed] +0ms
  thumbsup:debug photo:thumbnail from C:\Test\TestGallery\2023-07-07 🛶 Boat\314026932.jpeg to C:\Test\OutGallery\media\thumbs\2023-07-07 🛶 Boat\314026932.jpeg +5ms
  gm gm "identify" "-ping" "-format" "%[EXIF:Orientation]" "C:\Test\TestGallery\2023-07-07 🛶 Boat\314026932.jpeg" +0ms
  thumbsup:info Finished [title changed] +132ms
  thumbsup:info media\small\2023-07-07 🛶 Boat\314026932.jpeg [title changed] +0ms
  thumbsup:debug photo:small from C:\Test\TestGallery\2023-07-07 🛶 Boat\314026932.jpeg to C:\Test\OutGallery\media\small\2023-07-07 🛶 Boat\314026932.jpeg +131ms
  gm gm "identify" "-ping" "-format" "%[EXIF:Orientation]" "C:\Test\TestGallery\2023-07-07 🛶 Boat\314026932.jpeg" +130ms
  thumbsup:info Finished [title changed] +30ms
  thumbsup:info media\large\2023-07-07 🛶 Boat\314026932.jpeg [title changed] +0ms
  thumbsup:debug photo:large from C:\Test\TestGallery\2023-07-07 🛶 Boat\314026932.jpeg to C:\Test\OutGallery\media\large\2023-07-07 🛶 Boat\314026932.jpeg +30ms
  gm gm "identify" "-ping" "-format" "%[EXIF:Orientation]" "C:\Test\TestGallery\2023-07-07 🛶 Boat\314026932.jpeg" +30ms
  thumbsup:info Finished [title changed] +25ms
  thumbsup:info media\thumbs\2023-07-07 🛶 Boat\298305336.jpeg [title changed] +1ms
  thumbsup:debug photo:thumbnail from C:\Test\TestGallery\2023-07-07 🛶 Boat\298305336.jpeg to C:\Test\OutGallery\media\thumbs\2023-07-07 🛶 Boat\298305336.jpeg +25ms
  gm gm "identify" "-ping" "-format" "%[EXIF:Orientation]" "C:\Test\TestGallery\2023-07-07 🛶 Boat\298305336.jpeg" +25ms
  thumbsup:info Finished [title changed] +23ms
  thumbsup:info media\small\2023-07-07 🛶 Boat\298305336.jpeg [title changed] +1ms
  thumbsup:debug photo:small from C:\Test\TestGallery\2023-07-07 🛶 Boat\298305336.jpeg to C:\Test\OutGallery\media\small\2023-07-07 🛶 Boat\298305336.jpeg +24ms
  gm gm "identify" "-ping" "-format" "%[EXIF:Orientation]" "C:\Test\TestGallery\2023-07-07 🛶 Boat\298305336.jpeg" +24ms
  thumbsup:info Finished [title changed] +24ms
  thumbsup:info media\large\2023-07-07 🛶 Boat\298305336.jpeg [title changed] +0ms
  thumbsup:debug photo:large from C:\Test\TestGallery\2023-07-07 🛶 Boat\298305336.jpeg to C:\Test\OutGallery\media\large\2023-07-07 🛶 Boat\298305336.jpeg +25ms
  gm gm "identify" "-ping" "-format" "%[EXIF:Orientation]" "C:\Test\TestGallery\2023-07-07 🛶 Boat\298305336.jpeg" +24ms
  thumbsup:info Finished [title changed] +22ms
  thumbsup:info Finished [title changed] +1ms
  thumbsup:info Finished [title changed] +0ms
  thumbsup:info Finished [title changed] +0ms
  thumbsup:info Finished [title changed] +0ms
  thumbsup:info Finished [title changed] +0ms
  thumbsup:info Finished [title changed] +0ms
  thumbsup:info Finished [title changed] +1ms
  thumbsup:info Finished [title changed] +0ms
  thumbsup:info Finished [title changed] +0ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:info Finished [completed] +1ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:error Error processing 2023-07-07 🛶 Boat/298305336.jpeg -> media\thumbs\2023-07-07 🛶 Boat\298305336.jpeg
  thumbsup:error Error: Command failed: gm identify: Unable to open file (C:\Test\TestGallery\2023-07-07 ?? Boat\298305336.jpeg) [Invalid argument].
  thumbsup:error gm identify: Request did not return an image.
  thumbsup:error  +0ms
  thumbsup:info Processing media (1/6) [title changed] +2ms
  thumbsup:error Error processing 2023-07-07 🛶 Boat/314026932.jpeg -> media\large\2023-07-07 🛶 Boat\314026932.jpeg
  thumbsup:error Error: Command failed: gm identify: Unable to open file (C:\Test\TestGallery\2023-07-07 ?? Boat\314026932.jpeg) [Invalid argument].
  thumbsup:error gm identify: Request did not return an image.
  thumbsup:error  +1ms
  thumbsup:info Processing media (2/6) [title changed] +1ms
  thumbsup:error Error processing 2023-07-07 🛶 Boat/314026932.jpeg -> media\small\2023-07-07 🛶 Boat\314026932.jpeg
  thumbsup:error Error: Command failed: gm identify: Unable to open file (C:\Test\TestGallery\2023-07-07 ?? Boat\314026932.jpeg) [Invalid argument].
  thumbsup:error gm identify: Request did not return an image.
  thumbsup:error  +0ms
  thumbsup:info Processing media (3/6) [title changed] +0ms
  thumbsup:error Error processing 2023-07-07 🛶 Boat/314026932.jpeg -> media\thumbs\2023-07-07 🛶 Boat\314026932.jpeg
  thumbsup:error Error: Command failed: gm identify: Unable to open file (C:\Test\TestGallery\2023-07-07 ?? Boat\314026932.jpeg) [Invalid argument].
  thumbsup:error gm identify: Request did not return an image.
  thumbsup:error  +0ms
  thumbsup:info Processing media (4/6) [title changed] +0ms
  thumbsup:debug Exiftool exited with code 0 +2s
  thumbsup:info Finished [title changed] +1ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:info Finished [title changed] +0ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:info Finished [title changed] +0ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:info Finished [title changed] +0ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:error Error processing 2023-07-07 🛶 Boat/298305336.jpeg -> media\small\2023-07-07 🛶 Boat\298305336.jpeg
  thumbsup:error Error: Command failed: gm identify: Unable to open file (C:\Test\TestGallery\2023-07-07 ?? Boat\298305336.jpeg) [Invalid argument].
  thumbsup:error gm identify: Request did not return an image.
  thumbsup:error  +4ms
  thumbsup:info Processing media (5/6) [title changed] +3ms
  thumbsup:info Finished [title changed] +0ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:error Error processing 2023-07-07 🛶 Boat/298305336.jpeg -> media\large\2023-07-07 🛶 Boat\298305336.jpeg
  thumbsup:error Error: Command failed: gm identify: Unable to open file (C:\Test\TestGallery\2023-07-07 ?? Boat\298305336.jpeg) [Invalid argument].
  thumbsup:error gm identify: Request did not return an image.
  thumbsup:error  +20ms
  thumbsup:info Processing media  [title changed] +20ms
  thumbsup:info Finished [title changed] +0ms
  thumbsup:info Finished [completed] +0ms
  thumbsup:info Processing media  [completed] +0ms
  thumbsup:info Creating website [started] +0ms
  thumbsup:debug Theme does not have a package.json, using default options +0ms
  thumbsup:debug Loading partial analytics.hbs +2ms
  thumbsup:debug Loading partial thumbnail.hbs +1ms
  thumbsup:debug Loading partial video-loader.hbs +0ms
  thumbsup:debug Loading helper compare.js +2ms
  thumbsup:debug Loading helper date.js +1ms
  thumbsup:debug Loading helper relative.js +1ms
  thumbsup:debug Loading helper slice.js +1ms
  thumbsup:debug Loading helper times.js +1ms
  thumbsup:debug Rendering theme styles +1ms
  thumbsup:debug Loading partial content.hbs +16ms
  thumbsup:debug Rendering theme styles +42ms
  thumbsup:debug Theme rendering index.html +12ms
  thumbsup:debug Theme rendering 2023-07-07-🛶-Boat.html +27ms
  thumbsup:info Creating website [completed] +122ms
  thumbsup:info  +1ms
  thumbsup:warn
  thumbsup:warn  Warning: there was an issue with 2 files.
  thumbsup:warn  Please check the full log for more detail.
  thumbsup:warn  +0ms
  thumbsup:warn The following sources files were not processed:
  thumbsup:warn 2023-07-07 🛶 Boat/298305336.jpeg,2023-07-07 🛶 Boat/314026932.jpeg +0ms
  thumbsup:info ┌───────────────────────────────────┐
  thumbsup:info │                                   │
  thumbsup:info │  Gallery generated successfully!  │
  thumbsup:info │  2 albums, 2 photos, 0 videos     │
  thumbsup:info │                                   │
  thumbsup:info └───────────────────────────────────┘
  thumbsup:info  +1ms
PS C:\Test>

It seems that the command gm identify failed because it can not opens the files. And in fact, we see in logs that the command tries to open C:\Test\TestGallery\2023-07-07 ?? Boat\314026932.jpeg instead of C:\Test\TestGallery\2023-07-07 🛶 Boat\314026932.jpeg. So of course it can not find the file.

Also, even if a success message is displayed, the gallery is not working:
image

Config on Windows 10:

PS C:\Test> thumbsup --version # Thumbsup
2.18.0
PS C:\Test> $PsVersionTable.PSVersion # Powershell
Major  Minor  Patch  PreReleaseLabel BuildLabel
-----  -----  -----  --------------- ----------
7      4      0
PS C:\Test> node --version # NodeJs
v18.16.0
PS C:\Test> gm.exe -version # GraphicsMagick
GraphicsMagick 1.3.36 20201226 Q8 http://www.GraphicsMagick.org/

@Binnette Binnette changed the title Emojis in folder names not supported Emojis in folder names not supported on MS Windows Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing bug
Projects
None yet
Development

No branches or pull requests

2 participants