pymediainfo
pymediainfo copied to clipboard
PyInstaller + macOS: "An error occured while opening" files with special characters
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?
Hello, that looks like a bug with pyinstaller. Please provide at least a stack trace so I can see what is happening.
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 .
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
@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.
@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