Skip to content
hashstat edited this page May 26, 2015 · 26 revisions

Frequently Asked Questions

The purpose of this page is to share issues other developers have run into either with the platform or the specifics of their deployment. It is meant to supplement the issue tracking in github.


The following error message (or similar) is generated when I run the python2.7 bootstrap.py command to install VOLTTRON on a BeagleBone Black

Searching for BACpypes>=0.10,<0.11
Reading https://pypi.python.org/simple/BACpypes/
Download error on https://pypi.python.org/simple/BACpypes/: [Errno 1] _ssl.c:504:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -- Some
packages may not be found!
Couldn't find index page for 'BACpypes' (maybe misspelled?)

Note: This error will be generated for every package that tries to be installed from pypi.python.org/simple. BACpypes was just the first one it encountered. The full error message is attached if that is more helpful.

Solution

It is very possible that the SSL certificate is failing because the hardware clock on your BeagleBone is not set to the current time. You may check this by typing date in a terminal. If the correct time and date do not appear, there are two methods to update it to the current time. The first (easiest) requires you to perform a command every time the BeagleBone Black is powered on. The second (more difficult) is a one-time fix.

  1. Enter the command below in a terminal as a root user. (Note: This requires a network connection and might not work on networks with restrictive policies.)
root@beaglebone:~# ntpdate -b -s -u pool.ntp.org

If you are still having trouble, consult Derek Molloy's instructions.

or

  1. Follow Derek Molloy's instructions to make the BeagleBone Black update its clock automatically when it is powered on.

The problem is twofold: Angstrom only includes optimized .pyo bytecode files and not standard .pyc files in its Python package and virtualenv doesn't properly detect this issue. The former can be fixed following the solution below. A patch has been submitted to the virtualenv team which, once released, will prevent the issue in the first place.

Solution 1

Use the version of virtualenv included with the distribution to initialize the environment and then run bootstrap:

volttron@beaglebone:~/volttron$ virtualenv-2.7 env
New python executable in env/bin/python2
Also creating executable in env/bin/python
Installing setuptools, pip...done.
volttron@beaglebone:~/volttron$ env/bin/python bootstrap.py
...

Solution 1 will likely not work. :-(

Solution 2

Run the following commands as root (or use sudo) in a terminal to generate a site.pyc file and remove the .pyo file:

root@beaglebone:~# python -N -m py_compile /usr/lib/python2.7/site.py
root@beaglebone:~# rm /usr/lib/python2.7/site.pyo

Then remove the env directory in the volttron project and run bootstrap.py.

On Angstrom Linux, and any distribution based on OpenEmbedded, a sitecustomize.py script is included in the Python 2.7 distribution which imports readline regardless of python being run interactively. This causes escape characters to be written to stdout and interferes with virtualenv's executable check.

An error like this will be seen in the bootstrap.py output if this issue affects your distribution:

New python executable in env/bin/python
ERROR: The executable env/bin/python is not functioning
ERROR: It thinks sys.prefix is u'/home/user/volttron/\x1b[?1034h/home/user/volttron/testenv' (should be u'/home/user/volttron/testenv')
ERROR: virtualenv is not compatible with this system or executable

You can verify the issue affects you by running the following command and verify the escape characters print:

volttron@beaglebone:~$ python -c 'pass' | python -c 'print repr(__import__("sys").stdin.read())'
'\x1b[?1034h'

If the command prints the empty string '', then the solutions below will likely not help.

Solution 1

Modify /usr/lib/python2.7/sitecustomize.py so that it doesn't import readline during sitecustomize execution, which executes too early in the Python initialization process to determine if Python is running interactively. Try this script as a replacement for sitecustomize.py

Solution 2

Rename or move /usr/lib/python2.7/sitecustomize.py while bootstrapping and then put it back afterward.

Yes. See Speeding Up VOLTTRON Builds.

Wiki Home

Quick Start Guide

Getting VOLTTRON

VOLTTRON Community

VOLTTRON Core Services

Historians

Drivers

Instance Management

Applications
  • ...
Examples
Developers
HOWTOS

VOLTTRON Versions and Features

Transactional Network Platform Overview

Platform Services

Volttron Restricted

Information Exchange Standards

FAQ

Project Home

Clone this wiki locally