Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing import praat #81

Closed
Guillaume-Risch opened this issue May 18, 2022 · 6 comments
Closed

Missing import praat #81

Guillaume-Risch opened this issue May 18, 2022 · 6 comments

Comments

@Guillaume-Risch
Copy link

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!

@YannickJadoul
Copy link
Owner

Hi, @Guillaume-Risch. That's really weird indeed. There's a few things I can think of to try:

  • Could you import parselmouth and print(parselmouth.__file__) and report the output?
  • And could you print(dir(parselmouth))?
  • What happens if you first import parselmouth, and then run from 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?

@Boombabyyyyy
Copy link

Boombabyyyyy commented Aug 9, 2022

Hi, @Guillaume-Risch. That's really weird indeed. There's a few things I can think of to try:

  • Could you import parselmouth and print(parselmouth.__file__) and report the output?
  • And could you print(dir(parselmouth))?
  • What happens if you first import parselmouth, and then run from 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!

image

@Boombabyyyyy
Copy link

any updates? 🥺 @YannickJadoul

@YannickJadoul
Copy link
Owner

YannickJadoul commented Aug 17, 2022

@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.

@YannickJadoul
Copy link
Owner

@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.

@YannickJadoul
Copy link
Owner

YannickJadoul commented Feb 24, 2023

Closing, after almost a year without reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants