Hi there. I recently started getting some errors o...
# ask-community
p
Hi there. I recently started getting some errors on VS Code using pylance. For example, the following line
Copy code
from prefect import Flow, Parameter, task, unmapped
produces
Copy code
"Flow" is not exported from module "prefect"
Import from "prefect.core" instead Pylance(reportPrivateImportUsage)

"Parameter" is not exported from module "prefect"
Import from "prefect.core" instead Pylance(reportPrivateImportUsage)

"task" is not exported from module "prefect"
Import from "prefect.utilities.tasks" instead Pylance(reportPrivateImportUsage)

is not exported from module "prefect"
Import from "prefect.utilities.edges" instead Pylance(reportPrivateImportUsage)
Also, I am getting pylance errors when passing Parameters to tasks that expect
str
arguments. I don't believe this was happening before. Do you know if something changed recently in pylance or in how we are supposed to import modules? I am using prefect 0.15.4 Thanks!
k
Hey @Pedro Machado, I don’t use Pylance but nothing changed with the imports and you’re using them right.
What is your Pylance version? Will try to look into it
p
The extension version is v2021.9.2
There are some items in the changelog related to an upgrade of
Pyright
that sound like could be causing this but I can't tell for sure.
k
Stupid question. Turns out I do have Pylance 2021.5.2. Why do I not see later versions?
155 Views