-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with the circular import #228
Comments
@IvanKhanas Can you please provide more info as to how to reproduce this issue? You said RPM package? Did you install it on Fedora. Please let me know so that I can look into it and if there is an issue, then potentially fix it. |
@IvanKhanas Also, One issue I can already spot is that you are trying to run it on Python 3.9. The latest version is only supported on Python 3.10 and above. Can you try running it on Python3.10 and above and report back, please? |
I am building an RPM package from your project for ALT linux Here are the error logs from the IDE, I'm not very good at Python, but chatGPt gives the following explanation: The error you are encountering is caused by a circular import in Python. The error message states: ImportError: cannot import name 'dicttoxml' from partially initialized module 'json2xml' (most likely due to a circular import) Circular Import from json2xml import dicttoxml Possible Solutions:
json_to_xml.py
from .dicttoxml import dicttoxml |
Thanks for your explanation @IvanKhana. Could you please once ensure that you are definitely running Python greater than Python 3.10 or above while trying to package it? I will also try to check this issue on my end. |
the code does not pass the tests (pytest) when building the rpm package, the following error is presented when passing the %check section
Also, when opening a project in the IDE (VS Code) and trying to run project, we see the same error ...
Judging by the error in the screenshot, the problem is circular import. The error occurs when trying to import dicttoxml from the json2xml module.
Please fix this bug ;)
The text was updated successfully, but these errors were encountered: