Pymakr - Import module Error

  • Hi Team,
    I am a newbie trying to use Lopy (sysname='LoPy', nodename='LoPy', release='1.2.0.b1', version='v1.8.6-290-gdac16bd on 2017-01-05', machine='LoPy with ESP32') with PyMakr.
    I wanted to add new module and when i try to import it i am getting an error "ImportError: no module named 'http_client'"


    Thanks & regards,

  • Hi @Ralph Sync always fails after the firmware update of 1.2.0.b1 :(



  • Hi @mkharibalaji, first of all, remember to use sync before you press run. The run button just runs the currently selected file on the board, so it won't find the http_client file when it has not been synced to the board yet.

    If it needs to be in a lib folder, you can also create a new folder from pymakr using right click in the project bar -> new package. If you press sync now, it will sync the folder and containing files to the board as well.

  • That's good. You can also get Filezilla working, but as described somewhere on the Pycom site, you have to define a server first, using a passive single connection, and then connect to the server. Since these settings are the default for FireFTP, it worked right away. That makes FirFTP a littel bit more convenient, especially if you use Firefox anyhow as your Browser.
    You may set FireFTP to open a file i your preferred code editor if you double click on it in the LoPy pane. Saving it in the editor would store it back to LoPy. For the REPL prompt, you can also use a telnet client. Telnet + FireFTP would replace PyMakr then.

  • Atlast I found out,it seems like i need to FTP the python files to /flash/lib folder within the chip using some ftp client.I tried Filezilla but it failed and then i tried with FireFTP plugin of Mozilla Firefox and able to FTP it and finally made it to work.




Log in to reply

Pycom on Twitter