Astrobox will not start after update to 0.9(2)

So my box is stuck at “Your Astrobox is still booting up.” after updating from 0.8(8) -> 0.9(2).

I can still access the box via ssh and the service reports that it is under “start/running” status (process keeps changing though), and there is no pid at /var/run/astrobox.pid.

Is there a way to do a manual install or will I need to do another sd image - I had to do the same for 0.8(8).


Edit:
After a bit of messing about with jdk issues, old python security modules, and a bunch of other random things, I got AstroBox to spit out some logs:

2016-08-29 03:46:32,690 - octoprint.server - INFO - Starting AstroBox (AstroBox - v0.9(2)) - Commit (48db26b23fbd99e5caea450863ce86f2ef571f1a)
2016-08-29 03:46:32,695 - astroprint.migration - INFO - Checking for settings migrations...
2016-08-29 03:46:32,696 - astroprint.migration - INFO - Performed 0 settings migrations.
2016-08-29 03:46:32,898 - astroprint.printfiles.gcode - INFO - Migrating metadata if necessary...
2016-08-29 03:46:32,900 - astroprint.printfiles.gcode - INFO - Updated 0 sets of metadata to new format
2016-08-29 03:46:33,857 - astroprint.camera.v4l2.mjpeg - INFO - MPJEG Camera Manager initialized
2016-08-29 03:46:34,807 - astroprint.camera.v4l2.mjpeg - ERROR - Unable to determine Pixel Formats, this may be a driver issue.
Traceback (most recent call last):
  File "./run", line 23, in <module>
    octoprint.main()
  File "/home/ubuntu/astrobox/AstroBox/src/octoprint/__init__.py", line 77, in main
    startServer(args.config, args.basedir, args.host, args.port, args.debug, args.allowRoot, args.logConf)
  File "/home/ubuntu/astrobox/AstroBox/src/octoprint/__init__.py", line 99, in startServer
    astrobox.run()	
  File "/home/ubuntu/astrobox/AstroBox/src/octoprint/server/__init__.py", line 371, in run
    printer = printerManager(printerProfileManager().data['driver'])
  File "/home/ubuntu/astrobox/AstroBox/src/astroprint/printer/manager.py", line 24, in printerManager
    _instance = printerDriverMap[driver]()
  File "/home/ubuntu/astrobox/AstroBox/src/astroprint/printer/marlin/__init__.py", line 62, in __init__
    super(PrinterMarlin, self).__init__()
  File "/home/ubuntu/astrobox/AstroBox/src/astroprint/printer/__init__.py", line 82, in __init__
    state={"text": self.getStateString(), "flags": self._getStateFlags()},
  File "/home/ubuntu/astrobox/AstroBox/src/astroprint/printer/__init__.py", line 185, in _getStateFlags
    "camera": self.isCameraConnected()
  File "/home/ubuntu/astrobox/AstroBox/src/astroprint/printer/__init__.py", line 273, in isCameraConnected
    return cameraManager().isCameraConnected()
  File "/home/ubuntu/astrobox/AstroBox/src/astroprint/camera/__init__.py", line 34, in cameraManager
    _instance = MjpegManager(number_of_video_device)
  File "/home/ubuntu/astrobox/AstroBox/src/astroprint/camera/v4l2/mjpeg.py", line 31, in __init__
    super(MjpegManager, self).__init__(videoDevice)
  File "/home/ubuntu/astrobox/AstroBox/src/astroprint/camera/v4l2/__init__.py", line 22, in __init__
    self.cameraName = self.getCameraName()
  File "/home/ubuntu/astrobox/AstroBox/src/astroprint/camera/v4l2/__init__.py", line 163, in getCameraName
    with open(device, 'r') as vd:
IOError: [Errno 70] Communication error on send: '/dev/video0'

Here are the contents of config.yaml:

camera:
  manager: mjpeg
cloudSlicer:
  apiHost: https://api.astroprint.com
  boxrouter: wss://boxrouter.astroprint.com
  loggedUser: 
folder:
  logs: /var/log/astrobox
  timelapse: /sdcard/AstroBox/timelapse
  timelapse_tmp: /sdcard/AstroBox/timelapse/tmp
  uploads: /sdcard/AstroBox/uploads
  watched: /sdcard/AstroBox/watched
serial:
  port: /dev/ttyACM0
server:
  firstRun: false
  host: 127.0.0.1
software:
  lastCheck: 1469034774.722015
system:
  actions:
  - action: shutdown
    command: shutdown -H now
  - action: astrobox-restart
    command: restart astrobox
  - action: reboot
    command: reboot
wifi:
  hotspotDevice: wlan1

Where should I go from here?


Edit 2:
Got a bit further after restarting the system, unfortunately, I have come across another issue – here is the log:

2016-08-29 04:40:16,987 - octoprint - ERROR - Exception on / [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/ubuntu/AstroBox/src/octoprint/server/__init__.py", line 133, in index
    variantData= variantManager().data
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 128, in render_template
    context, ctx.app)
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 110, in _render
    rv = template.render(context)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/ubuntu/AstroBox/src/octoprint/../astroprint/templates/locked.jinja2", line 1, in top-level template code
    {% extends 'base.jinja2' %}
  File "/home/ubuntu/AstroBox/src/octoprint/../astroprint/templates/base.jinja2", line 9, in top-level template code
    {% block css %}{% endblock %}
  File "/home/ubuntu/AstroBox/src/octoprint/../astroprint/templates/locked.jinja2", line 4, in block "css"
    {% assets filters="scss", output="css/gen/locked.css",
  File "/usr/local/lib/python2.7/dist-packages/webassets/ext/jinja2.py", line 186, in _render_assets
    urls = bundle.urls()
  File "/usr/local/lib/python2.7/dist-packages/webassets/bundle.py", line 787, in urls
    urls.extend(bundle._urls(new_ctx, extra_filters, *args, **kwargs))
  File "/usr/local/lib/python2.7/dist-packages/webassets/bundle.py", line 747, in _urls
    return [self._make_output_url(ctx)]
  File "/usr/local/lib/python2.7/dist-packages/webassets/bundle.py", line 704, in _make_output_url
    version = self.get_version(ctx, refresh=ctx.auto_build)
  File "/usr/local/lib/python2.7/dist-packages/webassets/bundle.py", line 305, in get_version
    version = ctx.versions.determine_version(self, ctx)
  File "/usr/local/lib/python2.7/dist-packages/webassets/version.py", line 166, in determine_version
    hasher.update(hunk.data().encode('utf-8'))
  File "/usr/local/lib/python2.7/dist-packages/webassets/merge.py", line 77, in data
    f = open(self.filename, 'r', encoding='utf-8')
IOError: [Errno 2] No such file or directory: '/home/ubuntu/AstroBox/src/astroprint/static/css/gen/locked.css'

I am aware that the instructions on the repo are a bit outdated, is there anything else I need to run before AstroBox will run from source?

Did you modify the image at some point ? The scripts usually execute from /AstroBox and not from /home/ubuntu/AstroBox

The reason why you are seeing that path is because I downloaded a copy of AstroBox into that location in order to try and single out the install itself.

I’ll give the default install a few tries as well.

Yeah, try running from /AstroBox and see what the log says.

sudo python -OO /AstroBox/run --config=/etc/astrobox/config.yaml

Here is the log for that – had to shut down the service first:

ubuntu@AVnet-AXIOM:~$ sudo python -OO /AstroBox/run --config=/etc/astrobox/config.yaml
2016-07-05 10:32:59,613 - octoprint.server - INFO - Starting AstroBox (AstroBox - v0.9(2)) - Commit (48db26b23fbd99e5caea450863ce86f2ef571f1a)
2016-07-05 10:32:59,616 - astroprint.migration - INFO - Checking for settings migrations...
2016-07-05 10:32:59,617 - astroprint.migration - INFO - Performed 0 settings migrations.
2016-07-05 10:32:59,698 - astroprint.printfiles.gcode - INFO - Migrating metadata if necessary...
2016-07-05 10:32:59,699 - astroprint.printfiles.gcode - INFO - Updated 0 sets of metadata to new format
2016-07-05 10:33:00,371 - astroprint.camera.v4l2.mjpeg - INFO - MPJEG Camera Manager initialized
2016-07-05 10:33:00,492 - astroprint.network.debian - INFO - NetworkManagerEvents is listening for signals
2016-07-05 10:33:00,500 - astroprint.boxrouter - INFO - This box has id 8208b336a3994bd2b68fad25b9450b22
2016-07-05 10:33:00,563 - astroprint.network.debian - INFO - Network Manager reports state: *[connected_global]*
2016-07-05 10:33:00,835 - astroprint.network.debian - INFO - Active Connection is now eth0 (192.168.2.12)
2016-07-05 10:33:00,838 - astroprint.boxrouter - INFO - Device is online. Attempting to connect to box router.
Traceback (most recent call last):
  File "/AstroBox/run", line 23, in <module>
    octoprint.main()
  File "platforms/common/AstroBox/src/octoprint/__init__.py", line 77, in main
  File "platforms/common/AstroBox/src/octoprint/__init__.py", line 99, in startServer
  File "platforms/common/AstroBox/src/octoprint/server/__init__.py", line 359, in run
  File "/usr/local/lib/python2.7/dist-packages/tornado/tcpserver.py", line 125, in listen
    sockets = bind_sockets(port, address=address)
  File "/usr/local/lib/python2.7/dist-packages/tornado/netutil.py", line 145, in bind_sockets
    sock.bind(sockaddr)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use
ubuntu@AVnet-AXIOM:~$ sudo service astrobox stop
astrobox stop/waiting
ubuntu@AVnet-AXIOM:~$ sudo python -OO /AstroBox/run --config=/etc/astrobox/config.yaml
2016-07-05 10:33:32,873 - octoprint.server - INFO - Starting AstroBox (AstroBox - v0.9(2)) - Commit (48db26b23fbd99e5caea450863ce86f2ef571f1a)
2016-07-05 10:33:32,876 - astroprint.migration - INFO - Checking for settings migrations...
2016-07-05 10:33:32,877 - astroprint.migration - INFO - Performed 0 settings migrations.
2016-07-05 10:33:32,954 - astroprint.printfiles.gcode - INFO - Migrating metadata if necessary...
2016-07-05 10:33:32,955 - astroprint.printfiles.gcode - INFO - Updated 0 sets of metadata to new format
2016-07-05 10:33:33,617 - astroprint.camera.v4l2.mjpeg - INFO - MPJEG Camera Manager initialized
2016-07-05 10:33:33,728 - astroprint.network.debian - INFO - NetworkManagerEvents is listening for signals
2016-07-05 10:33:33,732 - astroprint.boxrouter - INFO - This box has id 8208b336a3994bd2b68fad25b9450b22
2016-07-05 10:33:33,952 - astroprint.network.debian - INFO - Network Manager reports state: *[connected_global]*
2016-07-05 10:33:34,039 - octoprint.server - INFO - Listening on http://127.0.0.1:5000
2016-07-05 10:33:34,082 - astroprint.network.debian - INFO - Active Connection is now eth0 (192.168.2.12)
2016-07-05 10:33:34,102 - astroprint.boxrouter - INFO - Device is online. Attempting to connect to box router.
2016-07-05 10:33:34,454 - astroprint.discovery - INFO - Registered AVnet-AXIOM for SSDP
2016-07-05 10:33:34,622 - astroprint.boxrouter - INFO - Connected to astroprint service
2016-07-05 10:33:42,912 - octoprint - ERROR - Exception on / [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "platforms/common/AstroBox/src/octoprint/server/__init__.py", line 124, in index
TypeError: 'bool' object is not callable

@Luis_E_Alvarado There’s a mismatch in the python dependencis your box is running. You can fix this by running:

# cd /AstroBox
# sudo pip install -r requirements.txt

You can try this but be aware that this all indicates that the image you have has been modified and is becoming unstable. If you keep having problems, I would recommend re-flashing the image. BTW, what HW are you running on?

This is a pcDuino3B - came with my AXIOM~
I’ll go ahead and re-image to get back on a stable install.