Parselmouth
Parselmouth copied to clipboard
Missing import praat
Hello, I have a problem with the using of praat I tried this : from parselmouth.praat import call, run_file But I met this error Import "parselmouth.praat" could not be resolved(reportMissingImports) By the way I had installed parselmouth with pip install praat-parselmouth Have you any ideas to help me ?
Thank you!
Hi, @Guillaume-Risch. That's really weird indeed. There's a few things I can think of to try:
- Could you
import parselmouth
andprint(parselmouth.__file__)
and report the output? - And could you
print(dir(parselmouth))
? - What happens if you first
import parselmouth
, and then runfrom parselmouth.praat import call
? (It should work, though, the way you did it; just trying to debug)
Moreover, just to be complete, what version of Python are you running, and on which OS?
Hi, @Guillaume-Risch. That's really weird indeed. There's a few things I can think of to try:
- Could you
import parselmouth
andprint(parselmouth.__file__)
and report the output?- And could you
print(dir(parselmouth))
?- What happens if you first
import parselmouth
, and then runfrom parselmouth.praat import call
? (It should work, though, the way you did it; just trying to debug)Moreover, just to be complete, what version of Python are you running, and on which OS?
I'm facing the same issue, the error in from parselmouth.praat import call, run_file keep showing, tried pip uninstall, install and even the sys subprocess method you suggested in another issue!
here are the details you requested!
any updates? 🥺 @YannickJadoul
@Boombabyyyyy, I was holiday for a week. So better give me a bit more time than half a day to reply ;-)
Apart from that, I don't see the issue? In your terminal, Parselmouth is correctly installed, so it seems to just be VSCode which is not processing the library correctly?
What happens if you just run the script? Ignore the yellow underline.
@Boombabyyyyy, please double-check your VSCode setup (e.g. look at https://linuxpip.org/fix-python-unresolved-import-in-vscode/) and see if things get resolved that way. Based on your output, Parselmouth is correctly installed, and can be imported and run. The only thing I can think of is that VSCode is confused because of Parselmouth being a binary extension module for Python, but ... yeah, not much I can do there.
Closing, after almost a year without reply.