Help with Python circular error

Chris Angelico rosuav at gmail.com
Tue Jun 15 12:49:02 EDT 2021


On Wed, Jun 16, 2021 at 2:45 AM Arak Rachael <arakelthedragon at gmail.com> wrote:
>> Hi to everyone,
>> I am having a problem with this error, I created a package and uploaded it to Test PyPi, but I can not get it to work, can someone help me please?
>> https://test.pypi.org/manage/project/videotesting/releases/'
>> The error:
>> /home/user/anaconda3/envs/testing/bin/python /home/user/devel/python.assignments/topgis-viz/topgis-test.py
> Traceback (most recent call last):
> File "/home/user/devel/python.assignments/topgis-viz/topgis-test.py", line 10, in <module>
> from videotesting import downsample_and_save_npz
> File "/home/user/anaconda3/envs/testing/lib/python3.8/site-packages/videotesting/__init__.py", line 7, in <module>
> from videotesting import extract_video
> ImportError: cannot import name 'extract_video' from partially initialized module 'videotesting' (most likely due to a circular import) (/home/user/anaconda3/envs/testing/lib/python3.8/site-packages/videotesting/__init__.py)
>
Hard to diagnose without the source code, but I'm thinking that your
__init__.py is probably trying to import from elsewhere in the
package? If so, try "from . import extract_video" instead.
ChrisA


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /