BrickPi serial writing error

it’s the second time that I found this problem with the BrickPI.
When I call the BrickPiUpdateValues() function from python2.7, I get this error as result:

>>> import BrickPi 
>>> BrickPi.BrickPiUpdateValues()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.linux-armv7l/egg/", line 551, in BrickPiUpdateValues
  File "build/bdist.linux-armv7l/egg/", line 680, in BrickPiTx
  File "/usr/lib/python2.7/dist-packages/serial/", line 462, in write
    if self.fd is None: raise portNotOpenError
AttributeError: 'Serial' object has no attribute 'fd'

Last time I had to rewrite the entire microsd card. Are there any other different options?

PS: I tried reinstalling the serial lib of python but it didn’t change the situation.

Simone Nascivera

Hi Simone, it seems that your serial library was corrupted. Can you help us retrace the steps you took to get here? Did you install something that uses serial or make any other changes to settings?

also you might try running these two lines at the beginning:

from BrickPi import *