Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Unable to open 'python3.pyi': unable to read file  #1816

Closed
@thavlik

Description

@thavlik

Given the following imports from Tensorflow 2.0:

from tensorflow.keras.layers import Conv2D, Conv1D, Conv2DTranspose, Flatten, Dense, Reshape, Lambda, Permute, Activation, Flatten, Dropout, Concatenate, Input, InputLayer
from tensorflow.keras.callbacks import ModelCheckpoint, EarlyStopping, TensorBoard
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.models import Sequential, Model

Go To Definition on any of the imported items (e.g. Conv2D) produces the following error message in the bottom right hand corner of the window, then does nothing:

Unable to open 'python3.pyi': Unable to read file (Error: File not found (/Users/thomashavlik/Library/Caches/Microsoft/Python Language Server/stubs.v4/SwD-VoYLOHwzYthhqh16DEHw0XO2V4x9eu3sm2QM9OA=/python3.pyi)).

Environment data

  • VS Code version: 1.39.2
  • Extension version (available under the Extensions sidebar): 2019.11.50794
  • OS and version: Mac OS 10.15.1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.5
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: tensorflow 2.0.0
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version vscode-python#3977): Broken for both Jedi and MS Language Server

Expected behaviour

It should open the definition in the python source

Actual behaviour

An error dialog appears in the bottom right hand corner of VS Code's main window.

Logs

No logs from console or output

Metadata

Metadata

Labels

bugSomething isn't workingduplicateThis issue or pull request already exists

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions