skelton-group / Phonopy-Spectroscopy

A collection of tools for simulating vibrational spectra, which interfaces with the Phonopy package.
MIT License
142 stars 54 forks source link

TypeError: load() missing 1 required positional argument 'Loader' #7

Closed MajestyV closed 1 year ago

MajestyV commented 2 years ago

The other day, I was using VASP+Phonopy with Phonopy-Spectroscopy to calculate the raman spectrum of a 2D materials. When I run phonopy-raman -p --ir_reps, such error TypeError: load() missing 1 required positional argument: 'Loader' came out. I think this is a little bug originated from line 212 in file ~/Phonopy-Spectroscopy/SpectroscoPy/Interfaces/Phonopy.py: inputYAML = yaml.load(inputReader). When I change this line to inputYAML = yaml.load(inputReader, Loader=yaml.FullLoader), the package was normal agian. Here is some extra information for this problem: https://www.icode9.com/content-4-1189057.html Hope this message could help perfect this package.

JMSkelton commented 1 year ago

This issue was due to the Loader argument being made mandatory rather than optional in newer versions of PyYAML, and has been addressed in the recent code updates.