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

    Pybytes Pymakr terminal no longer working

    Scheduled Pinned Locked Moved Issues & Bugs
    8 Posts 3 Posters 134 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.
    • T Offline
      troy salt
      last edited by

      The Pybytes Pymakr no longer works for all of my devices (both WiFi and LTE). When I try to connect via the online terminal, the REPL spits out this error:

      Unhandled exception in thread started by <bound_method>
      Traceback (most recent call last):
        File "_msg_handl.py", line 259, in _io_thread_func
        File "_msg_handl.py", line 197, in _receive_packet
        File "_mqtt_core.py", line 398, in _recv_callback
        File "_mqtt_core.py", line 368, in _parse_publish
        File "_mqtt_core.py", line 341, in _notify_message
        File "_mqtt.py", line 91, in set_callback
        File "_pybytes_protocol.py", line 249, in __process_recv_message
        File "_flash_control_OTA.py", line 125, in get_flash_hierarchy
      OSError: [Errno 2] ENOENT
      

      I don't think this is any fault of my own since I used to use this feature all the time, and it doesn't work in its most basic configuration. Anyone have any input here?

      Thanks,
      Troy

      1 Reply Last reply Reply Quote 0
      • G Offline
        Gijs
        last edited by

        Hi,
        Unfortunately I cannot reproduce the error you are describing..
        I know there is an error related to loading large files into Pymakr online (buffer size) and a fault where it blanks out when there are no files on the device, but I have yet to see this one.

        Could you perhaps provide some more details? Which firmware version are you running?

        Best,
        Gijs

        J T 2 Replies Last reply Reply Quote 0
        • T Offline
          troy salt
          last edited by

          Hi Gijs,

          Firmware version 1.20.2.r1
          but it I think it also happens on all 1.20.2 versions. I'm not sure if it happens on previous version
          1.6MB / 4MB memory used

          Please let me know if you need any other information, I'm happy to help as this is a very useful feature for me.

          Thanks,
          Troy

          1 Reply Last reply Reply Quote 0
          • T Offline
            troy salt
            last edited by

            Hi Gijs,

            I can confirm that it is due to the file sizes in my file system. I removed about 50kb of files reducing the filesystem size from 330kb to 284 kb, and now it works.

            Thanks for the info.

            Cheers,
            Troy

            1 Reply Last reply Reply Quote 0
            • J Offline
              Jean Ferreira @Gijs
              last edited by Jean Ferreira

              @Gijs I can confirm I'm getting this issue as well. 1.20.2.r1, Pybytes 1.6.0. G01

              I've deleted some files of my build but still getting the issue over LTE and Wifi when I manually connect to Pybytes using pybytes.connect_wifi() or pybytes.connect_lte() functions

              When I use pybytes.connect() it seems more robust.

              This is a fairly big issues with the pybytes connection library (no timeout on lte.attached blocking whole application, only single wifi ssid allowed, limited handling of disconnects) - which has forced me to use the manual connection functions.

              UPDATE - removed most files from my device but no change

              EDIT- realised my error was slightly different:

              Unhandled exception in thread started by <bound_method>
              Traceback (most recent call last):
              File "_msg_handl.py", line 259, in _io_thread_func
              File "_msg_handl.py", line 197, in _receive_packet
              File "_mqtt_core.py", line 398, in _recv_callback
              File "_mqtt_core.py", line 368, in _parse_publish
              File "_mqtt_core.py", line 341, in _notify_message
              File "_mqtt.py", line 91, in set_callback
              File "_pybytes_protocol.py", line 392, in __process_recv_message
              KeyError: 255

              1 Reply Last reply Reply Quote 0
              • J Offline
                Jean Ferreira
                last edited by

                Solved my issue - it was how I was establishing the MQTT connection to Pybytes.

                For various reasons (which I won't cover) I cannot use the autostart or connect() functions, I need to manually establish a Pybytes connection.

                For anyone looking to do this in the future, you need to call all of the following for the connection to emulate the library functions:

                pybytes.__pybytes_connection.__network_type = 1
                pybytes.__pybytes_connection.__initialise_watchdog()
                pybytes.__pybytes_connection.communication_protocol('wifi')
                pybytes.enable_terminal()
                pybytes.send_ping_message()

                With this your terminal and other functions should work as normal - but allows you to manage creation of the internet connections.

                1 Reply Last reply Reply Quote 0
                • T Offline
                  troy salt @Gijs
                  last edited by

                  @Gijs Hi Gijis - this error you refer to about loading large files into pymaker - can you elaborate on this? I've been having issues creating releases and I've found that it's due to either the compressed file being too large (~75kb) or the uncompressed files being too large (~275kb). Do you know if it is the total size that matters, or perhaps a single file in the folder that causes the problem? My largest file is 57kb.

                  This error really sucks, is there any effort being made to fix it? I've been posting all over the forum but no one is acknowledging my pleas.

                  Best,
                  Troy

                  1 Reply Last reply Reply Quote 1
                  • G Offline
                    Gijs
                    last edited by

                    Hi,
                    I can imagine that. I have put it on the bugs-list for Pymakr online a while back (when you first mentioned it), but it might be some time before we get to it (there's always more..) . I think the issue is related to having such a large file not fitting in the receive buffer of the device, though Im not sure.
                    At the moment I cannot think of a quick-fix for this issue, except for splitting the files into multiple smaller files, I think that should work

                    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