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

libcarla.py messy import of ad packages as top-level modules. #8093

Closed
Daraan opened this issue Aug 30, 2024 · 1 comment · May be fixed by #8152
Closed

libcarla.py messy import of ad packages as top-level modules. #8093

Daraan opened this issue Aug 30, 2024 · 1 comment · May be fixed by #8152

Comments

@Daraan
Copy link
Contributor

Daraan commented Aug 30, 2024

CARLA version: 0.9.15 dev (but not latest); using .egg file.
Platform/OS: Ubuntu 22.04

Problem you have experienced:

I realized that the integration of the ad subpackage is messy: Recusively all packages are added as top-level packages to sys.modules after the call to
spec = importlib.util.spec_from_file_location(__name__,__file__) in libcarla.py

Does not work; but should

import carla
import carla.ad

Does work

import carla
from carla import ad
carla.ad
# Below should not work
# all the subpackages of ad can be imported directly after importing carla
import ad
import map
import rss
...

I do not know if this is an issue of ad-rss-lib or from CARLA.

@Daraan
Copy link
Contributor Author

Daraan commented Sep 26, 2024

This is partially a problem of the ad library itself as they register the modules without packages.

@Daraan Daraan closed this as completed Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant