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 Situationfrom 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. |
Beta Was this translation helpful? Give feedback.
Answered by
Archmonger
Aug 1, 2023
Replies: 1 comment
-
You cannot name your Python file Please change your file name. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Archmonger
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You cannot name your Python file
reactpy
, otherwise you are redefining wherefrom reactpy import ...
imports from.Please change your file name.