Comments (2)
I think I have a related issue here, however it also occurred similarly with a local path, without a git repository.
This is the output with a local file ("Kaffeemaschine"), however same error occured when trying to load a local file inside a git-tracked folder:
ModuleNotFoundError Traceback (most recent call last)
Input In [2], in <cell line: 2>()
1 path_to_model = r"C:\Capella\Kaffeemaschine\Kaffeemaschine.aird"
----> 2 model = capellambse.MelodyModel(path_to_model, jupyter_untrusted=True)
File ~\AppData\Local\Python\Python39\site-packages\capellambse\model_init_.py:235, in MelodyModel.init(self, path, diagram_cache, diagram_cache_subdir, jupyter_untrusted, **kwargs)
232 capellambse.load_model_extensions()
234 self._constructed = False
--> 235 self._loader = loader.MelodyLoader(path, **kwargs)
236 self.jupyter_untrusted = jupyter_untrusted
238 try:
File ~\AppData\Local\Python\Python39\site-packages\capellambse\loader\core.py:388, in MelodyLoader.init(self, path, entrypoint, resources, **kwargs)
386 handler = path
387 else:
--> 388 handler = filehandler.get_filehandler(path, **kwargs)
389 self.resources = ResourceLocationManager({"\0": handler})
390 for resname, reshdl in (resources or {}).items():
File ~\AppData\Local\Python\Python39\site-packages\capellambse\filehandler_init_.py:84, in get_filehandler(path, **kwargs)
82 def get_filehandler(path: str | os.PathLike, **kwargs: t.Any) -> FileHandler:
83 handler_name, path = split_protocol(path)
---> 84 handler = load_entrypoint(handler_name)
85 return handler(path, **kwargs)
File ~\AppData\Local\Python\Python39\site-packages\capellambse\filehandler_init_.py:69, in load_entrypoint(handler_name)
67 except StopIteration:
68 raise ValueError(f"Unknown file handler {handler_name}") from None
---> 69 return ep.load()
File C:\Python3.9.10\lib\importlib\metadata.py:77, in EntryPoint.load(self)
72 """Load the entry point from its definition. If only a module
73 is indicated by the value, return that module. Otherwise,
74 return the named object.
75 """
76 match = self.pattern.match(self.value)
---> 77 module = import_module(match.group('module'))
78 attrs = filter(None, (match.group('attr') or '').split('.'))
79 return functools.reduce(getattr, attrs, module)
File C:\Python3.9.10\lib\importlib_init_.py:127, in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
File :1030, in _gcd_import(name, package, level)
File :1007, in find_and_load(name, import)
File :981, in find_and_load_unlocked(name, import)
ModuleNotFoundError: No module named 'capellambse.loader.filehandler.localfilehandler'; 'capellambse.loader.filehandler' is not a package
from py-capellambse.
@malnemark That's a different issue. How did you install capellambse? It should be solved by simply doing pip install -U capellambse
in the simplest case, but there might be stale metadata laying around somewhere, which confuses the import logic. (You might be able to fix that by doing pip uninstall capellambse
first.)
from py-capellambse.
Related Issues (20)
- Broken diagram SVG in documentation HOT 2
- PA demo notebook uses private `_filter` method (and fails)
- Missing Physical Path,Physical Link and component icons in generated images HOT 3
- Missing unconnected comments in generated images HOT 4
- Collapse Component Physical Ports makes edges dissapear
- Cannot save back to Git if revision wasn't passed in explicitly
- Additional model arguments are silently ignored when passing a FileHandler object as "path"
- CSA - Missing connectors and actor symbols between Actors and System
- `capellacommon.State.functions` always empty (model.search broken?) HOT 1
- Error: FIP/FOPSymbol wasn't found in factories HOT 1
- Distance between icon and label text is not uniform
- Diagram UUID inconsistent with Capella GUI HOT 1
- Declarative modelling : Problems when declaring new functions / components HOT 4
- Capella model loading failure due to Duplicate UUID HOT 4
- Model.save() breaks the model even without modifying anything HOT 1
- Functional chains (and other objects) not in order
- Automatic namespace management sometimes removes needed namespaces
- Enhancement of State / Mode objects
- Committing to Git sometimes fails with "object is unavailable"
- Support filtering of model elements with FilterCriterions during diagram export
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-capellambse.