0

I'm trying to modify this python file on GitHub with VS Code on Mac. And Pylance keeps complaining "addText" is not a known member of module Pylance reportGeneralTypeIssues on this line

eel.addText("<b style='color:green;'>data.json has been created successfully.</b>")

I'm sure it's not an error because I copied this file to a new folder and it runs correctly.

However when I check the eel source code in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/eel/__init__.py searching "addText", there's no result.

  • pip3 list | grep Eel shows Eel 0.10.4
  • python3 --version shows Python 3.9.9

Could you explain why is this happening? How can I suppress this warning?

Pablo LION
  • 1,294
  • 6
  • 20

1 Answers1

0

It's kind of simple, nothing to do with Python/Pylance. eel.addText() will call the function addText in <script> exposed in the app.html (see file from the same repo) passed to eel.start('app.html'). But I still don't know how to suppress this error.

Pablo LION
  • 1,294
  • 6
  • 20