Library Import Help



  • Just starting out on the Pycom and have run into an issue straight away. (Using GPy mounted to a PySense2 board.
    Installed VS Code, installed NodeJS, installed Pymakr extension.
    Downloaded the pycom-libraries-master from github and extracted.
    Open the example Pysense2 folder and load into VS code.
    Problem... nearly all import statements have squiggly red underline (ie. they are not recognised) Help please. It seems like there is a path environment variable that needs to be set up. For example where is the Pycom library stored? See pic below of github example code in Pysense2.![alt text](34f67531-b0f0-4278-baa1-6c9ce78f09b1-image.png image url)


  • Global Moderator

    All the modules are already available in the Pycom firmware on the device, which is why they are underlined as errors in the editor.

    Currently, we have no intellisense on Pycom libraries. In the REPL, you can use tab to autocomplete the line

    Gijs



  • Ok, thanks. Uninstalled the Python extension and errors have gone. So, because I'm new to this, does PyMakr install of the pycom libraries required as well as the REPL.

    Should I expect intellisense to work with the Pycom libraries? Because they don't at the moment.


  • Global Moderator

    You probably also have the Python or some other plugin installed. If you upload the code to the GPy device, the imports should work fine.

    Best,
    Gijs


Log in to reply
 

Pycom on Twitter