Hi, Im new here and I need help with understanding how imports works with python.
Im working with VS Code and used to working with JavaScript and with NPM.
I followed this Video and havent ran anything yet, but im getting errors on my imports, for example: these imports from Autodesk.Revit.DB import * from pyrevit import forms, revit, script gets these errors respectively: Import "Autodesk.Revit.DB" could not be resolvedPylance[reportMissingImports] Import "pyrevit" could not be resolvedPylance[reportMissingImports]
That VScode and plan e do not resolve the imports by default is normal. You need to setup the stubs for Revit API and pyrevit API to fix that. But this is not a real issue as your script runs within the Revit and pyrevit environment and not directly from VScode.
The place error can be ignored.
Thank you. it seems I accidentally skipped the video that teaches about the stubs, and after going through it I stop getting these errors.
I know that the code only runs inside Revit, but in general ignoring errors in code is a bad habit…