{"action":"created","issue":{"url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/41","repository_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel","labels_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/41/comments","events_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/41/events","html_url":"https://github.com/ManiacalLabs/BiblioPixel/issues/41","id":141483602,"number":41,"title":"TypeError: must be list, not bytearray","user":{"login":"kdheepak89","id":1813121,"avatar_url":"https://avatars.githubusercontent.com/u/1813121?v=3","gravatar_id":"","url":"https://api.github.com/users/kdheepak89","html_url":"https://github.com/kdheepak89","followers_url":"https://api.github.com/users/kdheepak89/followers","following_url":"https://api.github.com/users/kdheepak89/following{/other_user}","gists_url":"https://api.github.com/users/kdheepak89/gists{/gist_id}","starred_url":"https://api.github.com/users/kdheepak89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdheepak89/subscriptions","organizations_url":"https://api.github.com/users/kdheepak89/orgs","repos_url":"https://api.github.com/users/kdheepak89/repos","events_url":"https://api.github.com/users/kdheepak89/events{/privacy}","received_events_url":"https://api.github.com/users/kdheepak89/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-17T05:20:03Z","updated_at":"2016-03-17T13:20:28Z","closed_at":null,"body":"I get the following error when I try to run an animation test code\r\n\r\n```\r\npi@raspberrypi:~/GitRepos/BiblioPixel $ sudo python run.py\r\nINFO - spi_driver_base - py-spidev speed @ 2.0 MHz\r\nTraceback (most recent call last):\r\n  File \"run.py\", line 19, in <module>\r\n    led.update()\r\n  File \"/home/pi/GitRepos/BiblioPixel/bibliopixel/led.py\", line 136, in update\r\n    d._update(self.buffer[pos:d.bufByteCount + pos])\r\n  File \"/home/pi/GitRepos/BiblioPixel/bibliopixel/drivers/driver_base.py\", line 51, in _update\r\n    self.update(data)\r\n  File \"/home/pi/GitRepos/BiblioPixel/bibliopixel/drivers/spi_driver_base.py\", line 80, in update\r\n    self._sendData()\r\n  File \"/home/pi/GitRepos/BiblioPixel/bibliopixel/drivers/spi_driver_base.py\", line 73, in _sendData\r\n    self.spi.xfer2(self._buf)\r\nTypeError: must be list, not bytearray\r\npi@raspberrypi:~/GitRepos/BiblioPixel $\r\n```\r\n\r\nIt looks like SPI expects a list and not a bytearray\r\n\r\nThe results of `pip freeze` are below :\r\n\r\n```\r\nRPi.GPIO==0.6.0a3\r\nRTIMULib==7.2.1\r\nRasPiLEDStrip==0.9b\r\nWerkzeug==0.11.3\r\nargparse==1.2.1\r\nchardet==2.3.0\r\ncolorama==0.3.2\r\ngpiozero==1.0.0\r\nhtml5lib==0.999\r\nitsdangerous==0.24\r\nlxkeymap==0.1\r\nmcpi==0.1.1\r\nndg-httpsclient==0.3.2\r\nnumpy==1.8.2\r\npicamera==1.10\r\npifacecommon==4.2.1\r\npifacedigitalio==3.1.0\r\npyOpenSSL==0.13.1\r\npyasn1==0.1.7\r\npygame==1.9.2a0\r\npygobject==3.14.0\r\npyserial==3.0.1\r\nrequests==2.4.3\r\nsense-hat==2.1.0\r\nsix==1.8.0\r\nspidev==3.2\r\nurllib3==1.9.1\r\nwheel==0.24.0\r\nwsgiref==0.1.2\r\n```"},"comment":{"url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/comments/197876349","html_url":"https://github.com/ManiacalLabs/BiblioPixel/issues/41#issuecomment-197876349","issue_url":"https://api.github.com/repos/ManiacalLabs/BiblioPixel/issues/41","id":197876349,"user":{"login":"kdheepak89","id":1813121,"avatar_url":"https://avatars.githubusercontent.com/u/1813121?v=3","gravatar_id":"","url":"https://api.github.com/users/kdheepak89","html_url":"https://github.com/kdheepak89","followers_url":"https://api.github.com/users/kdheepak89/followers","following_url":"https://api.github.com/users/kdheepak89/following{/other_user}","gists_url":"https://api.github.com/users/kdheepak89/gists{/gist_id}","starred_url":"https://api.github.com/users/kdheepak89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdheepak89/subscriptions","organizations_url":"https://api.github.com/users/kdheepak89/orgs","repos_url":"https://api.github.com/users/kdheepak89/repos","events_url":"https://api.github.com/users/kdheepak89/events{/privacy}","received_events_url":"https://api.github.com/users/kdheepak89/received_events","type":"User","site_admin":false},"created_at":"2016-03-17T13:20:28Z","updated_at":"2016-03-17T13:20:28Z","body":"Thanks for the quick reply! I used the example in the Wiki for the animation test of LEDStrip.\r\n\r\nI found that commenting out [this line](https://github.com/ManiacalLabs/BiblioPixel/blob/master/bibliopixel/drivers/spi_driver_base.py#L21) solved the issue. Unfortunately, I wasn't able to find a version in spidev e.g. `spidev.__version__`. If there were a way to check, then we could ensure backward compatibility. We could use a `try: ... except: ...` block to determine if we should create a bytearray or list, but I'm not sure if that's an elegant solution. "}}