Error
Closed this issue · 7 comments
RuntimeError: An error occured while opening {PATH] with libmediainfo
I don't know what to do for work,
In past, it was worked well
Hi, please provide me with an example script and file that shows the error. Also, what OS are you using and what pymediainfo/libmediainfo version? How did you install them?
Hi, please provide me with an example script and file that shows the error. Also, what OS are you using and what pymediainfo/libmediainfo version? How did you install them?
Windows the last version of both and yes I have installed them and for long time it worked
I installed them with python pymediainfo with pip and libmediainfo with media info gui Windows
Does it happen all the time with all files, have you tried downgrading libmediainfo? Could it be caused by a weird path? You say it used to work, what did you change that made it fail?
I still need an example script that triggers the error.
All the time now, I use this MediaInfo.parse(path.mkv), no I have not tried to downgrade, no it’s not caused by weird path, i haven’t change anything why he could get this error
Something must have changed at one point, the error you mention only happens when the library fails to parse the file. You still haven't answered all of my questions. In order to help you, I'd like to know:
- does it happen with all files? (Is that what you meant by "All the time now"? I can only guess)
- does it happen all the time or does your script sometimes work?
- did you upgrade pymediainfo?
- did you upgrade libmediainfo?
- did you upgrade Python?
- did you upgrade Windows?
You can use markdown quotes to answer, it makes things more readable, for example:
> * did you upgrade pymediainfo?
answer here
> * did you upgrade libmediainfo?
answer here
will appear as
- did you upgrade pymediainfo?
answer here
- did you upgrade libmediainfo?
answer here
In addition, please try using a different MediaInfo.dll
file? You can use the library_file
parameter for this, see https://pymediainfo.readthedocs.io/en/stable/pymediainfo.html#pymediainfo.MediaInfo.parse
If you install pymediainfo from pip, it should use a wheel (pymediainfo-5.1.0-py3-none-win_amd64.whl
). This wheel already contains a MediaInfo.dll
so it is usually not necessary to install MediaInfo separately. Please try forcing pymediainfo.MediaInfo.parse
to use this file and let me know if it helps.
- does it happen with all files ?
Yes- does it happen all the time or does your script sometimes work ?
All the time- did you upgrade pymediainfo ?
No it's the last version : 5.1.0- did you upgrade libmediainfo ?
No and idk how- did you upgrade Python ?
No Version : Python 3.9.12- did you upgrade Windows?
No- did you upgrade Windows?
No- did i have change MediaInfo.dll or forcing with library_file
Yes and still not working
It's fine i have found just it's the path it's not write correctly it's like : C://dldld//dlld//dlldl
no : C:/dd/dd/dd/
Use the module os.path.realpath(path)