Git Product home page Git Product logo

Comments (2)

kairibu avatar kairibu commented on June 17, 2024

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.

Wuestengecko avatar Wuestengecko commented on June 17, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.