SpotlightKid / mrequests

An HTTP client library (not only) for MicroPython with an API similar to requests
MIT License
49 stars 10 forks source link

Thonny install issues? #15

Closed GSVNoFixedabode closed 8 months ago

GSVNoFixedabode commented 8 months ago

Ok, so this could be a lack of experience but ... Running Thonny on Win64, and installed mrequests via the Thonny Tools/packages option. When I try to use mrequests.get I get the following error: ImportError: no module named 'traceback'

mpremote and mpy-cross packages also installed. mrequests package info: Installed version: 0.1.2 Installed to: /lib Latest stable version: 0.1.2 Summary: Author: Danie Britto License: Homepage: https://github.com/dannybritto96/mrequests PyPI page: https://pypi.org/project/mrequests/ Requires: requests

ubidefeo commented 8 months ago

@GSVNoFixedabode the mrequests module that is installed via Thonny comes from PyPi, and it's not this project. You should use any other means of installing this via command line or by copying the files manually to your board's /lib folder.

Based on a couple exchanges I had with @SpotlightKid , support for installing mrequests via mip will also be available at some point, as MicroPython moves away from upip and consolidates their library ecosystem.

Relying on PyPi to install MicroPython libs can lead to a lot of headaches, because anyone can submit packages with pretty much any name, generating conflicts. I've been there with senml, and it took me quite a while to wrap my head around it.

Moreover, mip will allow anyone to use different sources such as GitHub to install packages.

GSVNoFixedabode commented 8 months ago

Cool, thanks for the reply