jath03 / openrgb-python

A python client for the OpenRGB SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Newbie question/error: ImportError: cannot import name 'OpenRGBClient' from partially initialized module 'openrgb' (most likely due to a circular import)

Calimerorulez opened this issue · comments

Hi,

Just experimenting with Python, I'm trying to get the module working, but I'm getting the following error when running the sample code below:

from openrgb import OpenRGBClient
cli = OpenRGBClient()
root@charon:~# python3 openrgb.py 
Traceback (most recent call last):
  File "/root/openrgb.py", line 1, in <module>
    from openrgb import OpenRGBClient
  File "/root/openrgb.py", line 1, in <module>
    from openrgb import OpenRGBClient
ImportError: cannot import name 'OpenRGBClient' from partially initialized module 'openrgb' (most likely due to a circular import) (/root/openrgb.py)

Can you please point me in the right direction?

commented

Because your file is named openrgb.py, it's trying to import OpenRGBClient from that file, which is causing issues. Just name the file something else and it should work.

Thank you very much for pointing that out!