y0shir opened issue #17: TypeError trying to import from module at Christopher Ostrouchov / pysrim

y0shir
2022-12-13T12:08:54Z

After installing, I have attemted to follow the example program. I'm using debian testing.

>>> from srim import Ion, Layer, Target, TRIM
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ivan/.local/lib/python3.10/site-packages/srim/__init__.py", line 1, in <module>
from .srim import TRIM, SR
File "/home/ivan/.local/lib/python3.10/site-packages/srim/srim.py", line 10, in <module>
from .core.utils import (
File "/home/ivan/.local/lib/python3.10/site-packages/srim/core/__init__.py", line 1, in <module>
from .element import Element
File "/home/ivan/.local/lib/python3.10/site-packages/srim/core/element.py", line 1, in <module>
from .elementdb import ElementDB
File "/home/ivan/.local/lib/python3.10/site-packages/srim/core/elementdb.py", line 13, in <module>
class ElementDB(object):
File "/home/ivan/.local/lib/python3.10/site-packages/srim/core/elementdb.py", line 15, in ElementDB
_db = create_elementdb()
File "/home/ivan/.local/lib/python3.10/site-packages/srim/core/elementdb.py", line 10, in create_elementdb
return yaml.load(open(dbpath, "r"))
TypeError: load() missing 1 required positional argument: 'Loader'