TypeError missing 1 required positional argument for pysrim package

Question:

I am trying to take advantage of the pysrim package to run some batch simulations of SRIM/TRIM in Jupyter notebook. I was able to successful install both the program and the package but am getting an error "TypeError: load() missing 1 required positional argument: ‘Loader’" when using pysrim. Initially I assumed my Python version was to up to date (3.9.12) but am still getting this issue even after setting up a 3.6 environment. I understand this is a most likely a pretty niche question but any help would be much appreciated. Code pasted below.

import os
import numpy as np
import matplotlib.pyplot as plt
from srim import TRIM, Ion, Layer, Target
from srim.output import Results

Thanks!

Asked By: Zach K

||

Answers:

Okay looks like I needed to change a small part of the program. I first navigated to C:Users<username>Anaconda3Libsite-packagessrimcore and opened the file elementsdb.py. On line 10 I changed return yaml.load(open(dbpath, "r")) to
return yaml.full_load(open(dbpath, "r")) and the issue was resolved.

Answered By: Zach K