-
-
Notifications
You must be signed in to change notification settings - Fork 328
ImportError: cannot import name 'component' from partially initialized module 'reactpy' (most likely due to a circular import) #1123
Answered
by
Archmonger
muhammadd8
asked this question in
Problem
-
Current Situation
from reactpy import component, html, run @component def hello_world(): return html.h1("Hello, World!") run(hello_world)
when i execute this test code, it gives me the error below
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/dev/Desktop/AIML/reactpy.py", line 1, in <module> from reactpy import component ImportError: cannot import name 'component' from partially initialized module 'reactpy' (most likely due to a circular import) (/home/dev/Desktop/AIML/reactpy.py)
reactpy is installed and sample application pages is opening as well.
kindly tell how to cater this issue?
Beta Was this translation helpful? Give feedback.
All reactions
Answered by
Archmonger
Aug 1, 2023
You cannot name your Python file reactpy, otherwise you are redefining where from reactpy import ... imports from.
Please change your file name.
Replies: 1 comment
-
You cannot name your Python file reactpy, otherwise you are redefining where from reactpy import ... imports from.
Please change your file name.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Answer selected by
Archmonger
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment