-2

I have a computer where I have recently re-installed Ubuntu and all of volttron. The code (GUI) has been tested on another machine running Volttron and it works fine.

Here's the mystery part: I start Volttron (cd Volttron, . env/bin/activate, volttron -vv -l volttron.log&) so that I am running in the environment. Then I use this line to compile my code so that I can run it:

./scripts/core/pack_install.sh examples/GUI examples/GUI/config agent.py

Normally (on my other machine) this spits out 8-10 lines of response and an agent ID that I can use to run the agent (typically use: volttron-ctl start --name GUI-0.1).

On this new machine, I use that same exact compile line and instead, it spits out two lines following:

VOLTTRON_HOME UNSET setting to /home/sntvizlab/.volttron VOLTTRON_HOME=/home/sntvizlab/.volttron
2017-07-06 09:24:28,841 () volttron.platform.packaging ERROR: no last exception doesn't exist

Anyone have any ideas?

Things I have tried:
1. I have used sudo apt-get update to make sure that all of the components are up to date.
2. I checked the log file using tail -f volttron.log to see if there was anything useful in there. All there is are the start-up commands successfully completing.
3. I un-installed and re-installed Ubuntu 16.04.2 and subsequently re-installed Volttron and its components to see if it was a problem with my installation. There is no change in my initial problem.

3 Answers3

0

The most common general error we see while installing agents stems from starting the platform without redirecting stderr and stdout to /dev/null and detaching the VOLTTRON process from the terminal.

One of the libraries we use for agent installation outputs to stdout. If the process is detached and the outputs are not redirected this will result in an error during agent installation.

When you start VOLTTRON use this command line to work around the problem:

volttron -vv -l volttron.log > /dev/null 2>&1&

Let me know if this doesn't resolve the problem.

Kyle Monson
  • 471
  • 1
  • 3
  • 6
0

@mitch.smith512 Hopefully you aren't still having this problem, however if you are then you should try using the scripts/install-agent.py script for installing agents. This will do all the steps in one and give you some better feedback.

Craig
  • 949
  • 1
  • 5
  • 13
0

As @Craig said, install-agent.py is a much better option and provides feedback on the real error.

Recently, I too had this same problem with a few of my agents after changing the code. The "no last exception doesn't exist" is thrown if there are syntax problems in the agent code. Most likely, a missing semicolon.

Either an IDE or validating the agent's code through some online Python syntax checker tools is helpful.

sambabug
  • 26
  • 6
  • please [edit] your answer to ensure that it improves upon other answers already present in this question. – hongsy Jan 20 '20 at 05:41