Skip to content

AssertionError #10

Closed
Closed

Description

@hippyjim

Following the guide on the readthedocs website, I get an AssertionError when trying the first set_row line:

codebug.set_row(0, 5)

Not sure it's connected to the given device - how do I check? Is this the right place to ask for support?

Activity

  1. tompreston commented on Sep 21, 2015

    @tompreston
    Contributor

    This is the right place to ask for support. Do you get the assertion error with all commands? Try:

    codebug.set_pixel(0, 0, 1)
    

    If no commands work then it looks like a connection issue - I've just had a look at the code and an assertion error is thrown when CodeBug doesn't reply with an ACK. Which operation system are you using? Have you loaded CodeBug with the correct firmware file? It's unusual that you can connect to CodeBug with:

    codebug = codebug_tether.CodeBug()
    

    but not run any commands.

  2. hippyjim commented on Sep 21, 2015

    @hippyjim
    Author

    I'm using Ubuntu 14.04.

    I'm not sure what you mean by the correct firmware file - I used the codebug_tether.cbg from the codebug website, then followed the instructions. I had to chmod /dev/ttyACM0 as before that I got permission denied, but then - here's the full stack trace:

    (venv)jim@jim-laptop:~/PycharmProjects/codebugMixed$ sudo chmod 777 /dev/ttyACM0
    [sudo] password for jim: 
    (venv)jim@jim-laptop:~/PycharmProjects/codebugMixed$ python
    Python 3.4.0 (default, Jun 19 2015, 14:20:21) 
    [GCC 4.8.2] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import codebug_tether
    >>> codebug = codebug_tether.CodeBug()
    >>> codebug.set_pixel(0, 0, 1)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/jim/PycharmProjects/codebugMixed/venv/lib/python3.4/site-packages/codebug_tether/core.py", line 171, in set_pixel
        self.set(y, mask, or_mask=True)  # OR row with mask
      File "/home/jim/PycharmProjects/codebugMixed/venv/lib/python3.4/site-packages/codebug_tether/core.py", line 32, in set
        tx_rx_packet(set_packet, self.serial_port)
      File "/home/jim/PycharmProjects/codebugMixed/venv/lib/python3.4/site-packages/codebug_tether/core.py", line 218, in tx_rx_packet
        assert (b == codebug_tether.packets.AckPacket.ACK_BYTE)
    AssertionError
  3. tompreston commented on Mar 3, 2016

    @tompreston
    Contributor

    There's been an update since this issue - are you still have problems?

  4. tompreston commented on Apr 26, 2016

    @tompreston
    Contributor

    I'm closing this issue since there appears to be no further problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions