ImportError: cannot import name 'component' from partially initialized module 'reactpy' (most likely due to a circular import) #1123
Answered byArchmonger
muhammadd8 asked this question in Problem
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Current Situationfromreactpyimportcomponent, html, run@componentdefhello_world(): returnhtml.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. |
BetaWas this translation helpful?Give feedback.
Answered by Archmonger Aug 1, 2023
Replies: 1 comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
You cannot name your Python file Please change your file name. |
BetaWas this translation helpful?Give feedback.
0 replies
Answer selected byArchmonger
Sign up for freeto 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.