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

PyInstaller + macOS: "An error occured while opening" files with special characters #121

Open
leogitpro opened this issue Apr 27, 2022 · 5 comments

Comments

@leogitpro
Copy link

Hi, I use pymediainfo to extract the information for video.
In the development mode. everyting is fine.
But when made a application from pyinstaller. when the program read a video file from pure english path will be OK.
if the path include chinese chars will be crashed. like: /Users/leo/Movies/测试视频/test01.mp4, or /Users/leo/Movies/测试01.mp4.
But the same file copy to /Users/leo/Movies/test01.mp4 will be parsed success.
Is there a encode bug?

@sbraz
Copy link
Owner

sbraz commented Apr 28, 2022

Hello, that looks like a bug with pyinstaller. Please provide at least a stack trace so I can see what is happening.

@leogitpro
Copy link
Author

Hi @sbraz , I try to use ffmpeg instead pymediainfo to get the video info in my app. It's works well.
Anyway, I have attached a creash report in the attchments.
Thanks a lot!
pymediainfo_crash.txt
.

@rsnyman
Copy link

rsnyman commented Jun 15, 2022

Hrm, I'm seeing a similar issue. Some of my app's users (macOS, PyInstaller) are reporting something similar (tracebacks below). I cannot reproduce on Linux, but I'll try on macOS.

Traceback (most recent call last):
  File "openlp/core/lib/mediamanageritem.py", line 602, in on_add_click
  File "openlp/core/lib/mediamanageritem.py", line 623, in add_to_service
  File "openlp/core/lib/mediamanageritem.py", line 663, in build_service_item
  File "openlp/plugins/media/lib/mediaitem.py", line 294, in generate_slide_data
  File "openlp/core/ui/media/mediacontroller.py", line 348, in media_length
  File "pymediainfo/__init__.py", line 496, in parse
RuntimeError: An error occured while opening /Users/user/Te daré lo mejor - Jesús Adrian Romero [Con letra].mp4 with libmediainfo
Traceback (most recent call last):
  File "openlp/core/lib/mediamanageritem.py", line 505, in on_double_clicked
  File "openlp/core/lib/mediamanageritem.py", line 528, in on_preview_click
  File "openlp/core/lib/mediamanageritem.py", line 663, in build_service_item
  File "openlp/plugins/media/lib/mediaitem.py", line 294, in generate_slide_data
  File "openlp/core/ui/media/mediacontroller.py", line 348, in media_length
  File "pymediainfo/__init__.py", line 496, in parse
RuntimeError: An error occured while opening /Users/user/Åsnan & Kossan dansar till ”Jag går på livets väg” av Sofia och Hanna Corneskog.mp4 with libmediainfo

@sbraz
Copy link
Owner

sbraz commented Jun 15, 2022

@rsnyman Hi, I really don't know what could happen with PyInstaller. I don't have an OSX system I can test right now. If you could reproduce, it would be nice. I assume, outside of PyInstaller, there won't be a problem.

@sbraz
Copy link
Owner

sbraz commented Nov 25, 2022

@rsnyman any luck reproducing without PyInstaller? If I were to attempt to reproduce this with PyInstaller, how would I do it?
EDIT: link to issue: https://gitlab.com/openlp/openlp/-/issues/1041

@sbraz sbraz changed the title Crashed when parse a video which in chinese directory name or include chinese chars video name PyInstaller + macOS: "An error occured while opening" files with special characters Nov 25, 2022
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

3 participants