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

ImportError: cannot import name 'FFProbe' from partially initialized module 'ffprobe' #11

Open
sgraaf opened this issue Dec 24, 2020 · 8 comments

Comments

@sgraaf
Copy link

sgraaf commented Dec 24, 2020

Hi! I just installed your ffprobe wrapper directly from PyPi, but when I tried to use it (as per the example), I get the following error:

>>> from ffprobe import FFProbe
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\sgraaf\AppData\Roaming\Python\Python39\site-packages\ffprobe\__init__.py", line 1, in <module>
    from ffprobe import FFProbe
ImportError: cannot import name 'FFProbe' from partially initialized module 'ffprobe' (most likely due to a circular import) (C:\Users\sgraaf\AppData\Roaming\Python\Python39\site-packages\ffprobe\__init__.py)

I am using ffprobe 0.5 w/ Python 3.9.0 on Windows 10 X64.

@hugomcruz
Copy link

I was having the same issue when my script file was called ffprobe.py. Check your filename.

@sohpark
Copy link

sohpark commented Apr 12, 2021

I was having the same issue when my script file was called ffprobe.py. Check your filename.

how did you fix this problem?

@hugomcruz
Copy link

Do you have any file in your project called ffprobe.py? If you have, rename it with some other name.

I had a file in my project with this name, and that was causing the issue, as the FFProbe class is in a ffprobe.py file.

@sgraaf
Copy link
Author

sgraaf commented Apr 21, 2021

I was having the same issue when my script file was called ffprobe.py. Check your filename.

There's no filename to check: I ran into this error directly from the Python REPL (as you might have been able to tell from the >>>)!

@RobMullen
Copy link

This is most likely because of the use of the VERY old PyPi package ffprobe, instead of the current one for this project, ffprobe-python

@mozai
Copy link

mozai commented Mar 18, 2023

Using ffprobe-0.5-py3, python -c 'import ffprobe' Triggers this problem, this is not caused by a file named "ffprobe.py" in cwd.

@hainesdata
Copy link

hainesdata commented Feb 10, 2024

Reviving since I'm having the same issue as well. I'm running something using pydub in a Jupyter notebook in a virtual python environment. Both ffmpeg and ffprobe are installed in my environment and located in site-packages. I tried the following at the top of the file:

import sys
sys.path.append('/Users/jake/PycharmProjects/py-venv/lib/python3.11/site-packages/ffmpeg')
sys.path.append('/Users/jake/PycharmProjects/py-venv/lib/python3.11/site-packages/ffprobe')
sys.path.append('/Users/jake/PycharmProjects/py-venv/lib/python3.11/site-packages/ffmpeg')

However, when I do import os; print(os.environ['PATH']), none of the above paths are returned.

Anyone had a look at this thread since then? Stumped on this.

@eggehad
Copy link

eggehad commented Mar 2, 2024

I had the exact same problem. How did I fix it? Turns out i installed this function using: pip install ffprobe, which as RobMullen points out above installs the very old PyPi version. So I uninstalled that one: pip uninstall ffprobe
Then I re-installed the correct new one: pip install ffprobe-python.
Wha la. Now working correctly. Ideally the docs would be updated to reflect this fact. As it took me a bit of time to figure this one out.

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

7 participants