Hoektronics / bumblebee

BotQueue's client Bumblebee
7 stars 7 forks source link

Bumblebee crashes on startup #7

Open JoonasMelin opened 8 years ago

JoonasMelin commented 8 years ago

There seems to be an issue with the json dumping of the scanned devices. I am still tracking this error down but it would seem that the root cause for the whole crash is on line 89 at app.py

The code that produces this error is:

def scanDevices(self):

        # look up our data
        data = {}
        data['bots'] = hive.scanBots()
        data['cameras'] = camera_control.scanCameras()

        scanData = json.dumps(data)

The error is:

<type 'exceptions.TypeError'>, <serial.tools.list_ports_linux.SysFS object at 0x7
fdc02a25f90> is not JSON serializable

My data looks like this:

{b'bots': {b'printcoredriver': [<serial.tools.list_ports_linux.SysFS object at 0x
7fdc02a25f90>, <serial.tools.list_ports_linux.SysFS object at 0x7fdc02a25fd0>, <s
erial.tools.list_ports_linux.SysFS object at 0x7fdc029a2cd0>]}, b'cameras': []}
JoonasMelin commented 8 years ago

One possible solution seems to be to just change the json.dumps to str() commands in app.py and botqueueapi.py (line300) but I have no idea what the long term effects of this are.

This would seem to be caused by some library update which prevents the json library from serializing the objects properly (I don't think it was never meant to do that in the first place).

I am still left with an issue where the jobs are not running and are just going to QA straight away, but I suspect this is a separate issue.

Jnesselr commented 8 years ago

It's mostly just that I didn't specify the version and right now it's pulling version 3.0 instead of the 2.7 version that it should for now.