Skip to content
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

[ImportError] behavior module name conflicts with pyecore.behavior #1

Open
cgava opened this issue Mar 8, 2021 · 2 comments
Open
Labels
bug Something isn't working

Comments

@cgava
Copy link
Owner

cgava commented Mar 8, 2021

detected on commit: 68a0370

Traceback (most recent call last):
  File "capella2python/tests/test.py", line 7, in <module>
    import pyEcoreCapella.activity as Activity
  File "capella2python/pyEcoreCapella/activity/__init__.py", line 2, in <module>
    from .activity import getEClassifier, eClassifiers
  File "capella2python/pyEcoreCapella/activity/activity.py", line 7, in <module>
    from behavior import AbstractBehavior
  File "GitWS-Community/pyecore/pyecore/behavior.py", line 36, in <module>
    from . import ecore
ImportError: attempted relative import with no known parent package
@cgava cgava added the bug Something isn't working label Mar 8, 2021
@cgava
Copy link
Owner Author

cgava commented Mar 11, 2021

Problem is solved by the two following steps

  1. rename behavior (to ebehavior for example) in pyecore
  2. create init.py at the root of pyEcoreCapella that imports all the symbols defined in packages

@cgava cgava changed the title [ImportError] attempted relative import with no known parent package [ImportError] behavior module name conflicts with pyecore.behavior Mar 11, 2021
@cgava
Copy link
Owner Author

cgava commented Mar 24, 2021

happens also with re package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant