python-language-server icon indicating copy to clipboard operation
python-language-server copied to clipboard

The IntelliSense for EmailMessage has wrong spelling in one function.

Open ujjukumar opened this issue 5 years ago • 6 comments

Environment data

Version: 1.45.0 (system setup) Commit: d69a79b73808559a91206d73d7717ff5f798f23c Date: 2020-05-07T16:18:48.860Z Electron: 7.2.4 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Windows_NT x64 10.0.18363

Problem

The autocomplete for Python module EmailMessage (from email.message module) has misspelling for function add_attachment. Instead of add_attachment it's completing it to add_attachement, which is creating this error when running:-

AttributeError: 'EmailMessage' object has no attribute 'add_attachement'

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

XXXX

ujjukumar avatar May 18 '20 11:05 ujjukumar

Hi @ujjukumar. Are you using Jedi or the Microsoft language server? Please provide the content of your workspace settings.json and of the "Python" output panel. Thanks!

ericsnowcurrently avatar May 20 '20 20:05 ericsnowcurrently

Hi @ericsnowcurrently, sorry I had exams so couldn't reply sooner. So, I am using Microsoft language server (default that comes from installing python extension).

And, Output panel has this message :- AttributeError: 'EmailMessage' object has no attribute 'add_attachement'

output json

And, workspace settings.json is this :- "python.pythonPath": "C:\\ProgramData\\Anaconda3\\envs\\caffe\\python.exe", "python.dataScience.jupyterServerURI": "local"

worspace json

ujjukumar avatar May 24 '20 04:05 ujjukumar

Also, when I change attachement to attachment it works fine!

This is code :- new

This is it's output :- output new

ujjukumar avatar May 24 '20 05:05 ujjukumar

@ujjukumar, that's helpful information. I'm going to send this issue over to the language server team for further attention.

ericsnowcurrently avatar May 27 '20 20:05 ericsnowcurrently

Any update?

ujjukumar avatar Jun 07 '20 08:06 ujjukumar

Requires #1371, as we vendor a copy of typeshed (and it hasn't been updated in a while due to compatibility problems).

jakebailey avatar Jun 07 '20 23:06 jakebailey