Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Pymakr - Import module Error

    Scheduled Pinned Locked Moved Pymakr
    5 Posts 3 Posters 2.7k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      mkharibalaji
      last edited by mkharibalaji

      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 http_client.py and when i try to import it i am getting an error "ImportError: no module named 'http_client'"
      0_1483858983750_pymakr.png

      0_1483858997131_pymakr_module_error.png

      Thanks & regards,
      Hari

      1 Reply Last reply Reply Quote -1
      • M Offline
        mkharibalaji
        last edited by

        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.

        :)

        0_1483863646058_upload-c4369830-568e-4497-8c5c-36ef17a595ba

        0_1483863669183_upload-51a22099-61a8-4b3a-803b-f42af60a561f

        1 Reply Last reply Reply Quote 0
        • robert-hhR Offline
          robert-hh
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • R Offline
            Ralph
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • M Offline
              mkharibalaji
              last edited by mkharibalaji

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

              0_1483972280616_upload-248706c4-4dee-4cf4-ae11-6944372a4790

              //Hari

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post

              Pycom on Twitter

              Pycom