Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
938 views

I've been running into the following pylance error. Object of type "Series[Unknown]" is not callable Sample code to recreate error: import pandas as pd df = pd.DataFrame({'col1': ['a', 'b', ...
John Jam's user avatar
  • 405
2 votes
1 answer
376 views

I've configured my VS Code project to use the Pylance extension. I know that Pylance is using Pyright internally. We have a "no-warning" policy. I want to enforce this by running Pyright (in ...
gawi's user avatar
  • 14.2k
1 vote
0 answers
3k views

I have python code that uses __getattr__ to relay non existing member accesses to another object. I have written a Mypy plugin which makes the type hints work. class StrProxy(Proxy[str]) s: str ...
Omer Lubin's user avatar
0 votes
1 answer
639 views

I just installed MS VS Code and all of the recommended extensions for Python, including Pylance. In every tutorial for OpenCV I see, there are descriptions shown for every single function when I type ...
DoGo's user avatar
  • 1
1 vote
1 answer
178 views

Pylance seems to recognize an attrs field as a function (rather than a variable) when the paramter converter= is specified. How to correct it? (Python v3.8.13, Pylance v2023.12.100) from typing import ...
Chitaoji's user avatar
1 vote
1 answer
524 views

With the latest official Python extension, Pylance fails to index python files: enter image description here The output of the Python language server output tab is: 2023-12-13 15:30:15.510 [info] [...
Kirill Zaitsev's user avatar
0 votes
1 answer
141 views

Whenever I install a new library, I get this error from VScode. I searched up how to fix it and got confused. One solution told me to Ctrl+Shift+P, select the python interpreter. on my computer, and ...
MoonLightWarrior's user avatar
0 votes
1 answer
1k views

I use VSCode write my code in remote Linux Server with Python and Pylance extensions. but the Pylance don't work in my root folder, like this: Pylance don't work, the color of import module don't ...
Victor Lee's user avatar
0 votes
1 answer
517 views

I'm using conda environment in vscode. TensorFlow is installed and can be used properly. But Pylance show [reportMissingImports] in some of imported submodules or classes, etc. For example, refer to ...
BALKIN's user avatar
  • 11
2 votes
1 answer
2k views

I have been using Pylance for auto suggestions and completions. Recently i added Pylint to help me lint my code but the moment i installed Pylint my Pylance stopped working (its not giving any auto ...
Tester's user avatar
  • 181
3 votes
3 answers
682 views

from typing import Literal, overload, TypeVar, Generic, Type import enum import abc import typing class Version(enum.Enum): Version1 = 1 Version2 = 2 Version3 = 3 import abc from typing ...
alexp's user avatar
  • 1,134
0 votes
1 answer
341 views

Yesterday I upgraded from 3.11 to python 3.12. The editor that i use is VScode. When i use standard patterns with matplotlib (from the official docs), the intellisense does not recognise the types and ...
darren's user avatar
  • 6,071
2 votes
0 answers
956 views

I have the following structure: mypackage/ ├─ subpackage/ │ ├─ __init__.py │ ├─ module.py │ ├─ module.pyi ├─ __init__.py File mudule.pyi contains: class Apple: tree: Tree class Tree: ...
MPEI_stud's user avatar
  • 135
-1 votes
1 answer
66 views

I am attempting to get a value from a h5 dataset using h5py with the dict-like indexing. I tested the code and it works, but pylance shows me this error in vscode. The error "Expect expression&...
Austin Benny's user avatar
0 votes
1 answer
585 views

Small question but annoying. In VSCode, it is reporting a "reportMissingImports" error even though the import and the code is working fine. Here is the relevant portion. import requests from ...
geckels1's user avatar
  • 644
2 votes
1 answer
416 views

I'm using VSCode. Although my code runs as expected, I'm getting linting errors. The code: import tensorflow.keras as keras The error: Import "tensorflow.keras" could not be resolved. I've ...
Zsombor Szommer's user avatar
1 vote
0 answers
143 views

When I install a Pypi package which I published via Poetry, I am not able to get import suggestions by VsCode. With Pycharm that works fine. I expect it to show up here: Missing import suggestion This ...
t-ober's user avatar
  • 11
1 vote
0 answers
164 views

in the last week, I had a problem with my VsCode, I'm developing Python RPA and the lint (pylance) didn't work in the local server path, does not identify the function, and the possible errors Program ...
Claudinei Gomes's user avatar
1 vote
1 answer
282 views

I am working with SymPy package (https://www.sympy.org/en/index.html). The code runs fine, for example, this small portion of code: from sympy import Symbol, exp, integrate x = Symbol('x') f = 2.5*exp(...
k2pctdn's user avatar
  • 179
0 votes
0 answers
159 views

VSCode doesn't show the docstring for the import pandas. This is show for other libraries like Numpy and Scipy. Also is doesn't show the docstring for read_csv, but for read_excel is show. The ...
Gabriel Marinello's user avatar
0 votes
1 answer
933 views

Edit: Solved, I had to create a virtual environment apparently. After I created one and started working from there, importing worked fine. I've encountered a persistent issue in Visual Studio Code (...
JonasB1231's user avatar
1 vote
0 answers
106 views

This is similar to this question, except here the valid arguments are contained in a json file. In Python using VSCode, I'd like to define a type which is based on the contents of a JSON file. Is such ...
OwlBandicoot's user avatar
3 votes
3 answers
8k views

I am using Pylance extension in VS Code. Some packages import cannot be resolved by Pylance. I found out that these packages are located in a shared folder and the UNC Path of this folder is in the ...
Guest6117's user avatar
1 vote
1 answer
2k views

I have a list of numbers with some elements being characters instead. I make a function so that it filter out any character, it works but if I use the max() function on the list and assign it to a ...
Da Krabs Koder's user avatar
0 votes
0 answers
429 views

I'm working on a project where I need to analyze a Python codebase and extract type information for specific variables programatically. I'm interested in using Pylance (or the underlying Pyright) ...
Exploring's user avatar
  • 3,683

1 2
3
4 5
11