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

    time.sleep_ms -> wrong argument type ?!

    Scheduled Pinned Locked Moved LoPy
    timesleep
    4 Posts 2 Posters 1.4k 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.
    • sorenS Offline
      soren
      last edited by

      hello,

      in my patch i have said "import time"
      and then later on i write time.sleep_ms(500)
      but the compiler tells me:

      Traceback (most recent call last):
      File "main.py", line 14, in <module>
      TypeError: argument has wrong type

      and i go like "wait, what.. wHAT??"

      L 1 Reply Last reply Reply Quote 0
      • L Offline
        livius @soren
        last edited by

        @soren
        which firmware version?

        os.uname()
        

        and are you sure that line 14 is about time.sleep_ms(500)?
        Or it contain var instead of 500?

        think about people first, then computers

        sorenS 1 Reply Last reply Reply Quote 0
        • sorenS Offline
          soren @livius
          last edited by

          ok so apparently it's the compiler that's pretty useless. the problem was not (despite the compiler saying so) line 14, but something in my initialization of SPI.

          os.uname gives me:

          (sysname='LoPy', nodename='LoPy', release='1.6.8.b2', version='v1.8.6-530-gca8bdcbb on 2017-03-21', machine='LoPy with ESP32', lorawan='1.0.0')

          L 1 Reply Last reply Reply Quote 0
          • L Offline
            livius @soren
            last edited by

            @soren
            current firmware is 1.6.13.b1

            but i never have had problem with line number in error message
            Do you have line break as LF or CRLF or mixed?

            think about people first, then computers

            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