JoFrhwld / FAVE

A repository for maintaing the fave-align and fave-extract toolkits
GNU General Public License v3.0
114 stars 37 forks source link

extractFormants module imports don't work out-of-the-box #52

Closed chrisbrickhouse closed 1 year ago

chrisbrickhouse commented 2 years ago

Was troubleshooting fave/extractFormants.py on a fresh install of Fave2.0.0 and found an issue with the import fave instructions. If the module is installed via pip (or pip -e) then this import should function fine. If users are running it as a script from a downloaded repo (like they would in Fave1.X), the script fails with a ModuleImportError because it is inside the fave directory and cannot find the module locally.

The workaround we found is to move ./fave/extractFormants.py up the tree to ./extractFormants.py so that that the relative import works. I'm not sure this is a viable solution in terms of packaging though. An alternative might be to change it to a relative import using import ., or modifying the script to fail gracefully and fall back on a relative import.