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

    Failure on urequests library OSError: no available NIC

    Scheduled Pinned Locked Moved Issues & Bugs
    urequestsurequest.pygetoserrorrequests
    2 Posts 2 Posters 139 Views 2 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.
    • N Offline
      nervencid
      last edited by

      Hello i'm trying to use the urequest library provided here, whit firmware 1.18.0:

      https://github.com/SeaSlugLabs/Pycom-Examples/blob/master/WiPy/ADC-Light-Sensor-To-Cloud/lib/urequest.py

      but when i try to make a petition:

      res = requests.get("https://jsonplaceholder.typicode.com/todos/1")```
      
      

      i got an OSError: -1

      and when i try to add headers to the petition i get OSError: no available NIC

      Whats wrong with requests library? or which one is the updated one? i found 4 versions in differents sites

      Thank you

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

        Hi,

        Did you check whether your WiPy is connected to wifi? If WiPy is not connected to wifi, you can receive oserror.

        After being sure that your WiPy connected to wifi, please try your code.

        Best,

        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