packagefinder Error in Webapp

General Discussion

packagefinder Error in Webapp

Postby Jrdiver » Thu Apr 30, 2015 7:38 am

I'm in the process of trying to build a working install of the alarmdecoder webapp on my raspberry pi 2 with the ad2pi and i keep hitting a packagefinder error on the "sudo python manage.py initdb" step. following the output back up I am not seeing anything that is telling me what needs to be updated/downgraded/installed.

Full output from this command:
Code: Select all
pi@AlarmRbPi /opt/alarmdecoder-webapp $ sudo python manage.py initdb
Traceback (most recent call last):
  File "manage.py", line 16, in <module>
    app, appsocket = create_app()
  File "/opt/alarmdecoder-webapp/ad2web/app.py", line 74, in create_app
    decoder = Decoder(app, appsocket)
  File "/opt/alarmdecoder-webapp/ad2web/decoder.py", line 78, in __init__
    self.updater = Updater()
  File "/opt/alarmdecoder-webapp/ad2web/updater/models.py", line 35, in __init__
    self._components['webapp'] = WebappUpdater('webapp')
  File "/opt/alarmdecoder-webapp/ad2web/updater/models.py", line 97, in __init__
    self._source_updater = SourceUpdater('webapp')
  File "/opt/alarmdecoder-webapp/ad2web/updater/models.py", line 231, in __init__
    self._requirements_updater = RequirementsUpdater()
  File "/opt/alarmdecoder-webapp/ad2web/updater/models.py", line 577, in __init__
    self.finder = self._get_package_finder()
  File "/opt/alarmdecoder-webapp/ad2web/updater/models.py", line 687, in _get_package_finder
    return PackageFinder(**finder_options)
  File "/usr/local/lib/python2.7/dist-packages/pip-6.1.1-py2.7.egg/pip/index.py", line 66, in __init__
    "PackageFinder() missing 1 required keyword argument: "
TypeError: PackageFinder() missing 1 required keyword argument: 'session'


On a side question, is there a preconfigured image that functions on a pi 2 without needing a older rpi to update the rasbian install? The current image will not boot at all on the pi 2.
Jrdiver
newt
newt
 
Posts: 7
Joined: Wed Apr 29, 2015 10:04 pm

Re: packagefinder Error in Webapp

Postby kevin » Thu Apr 30, 2015 9:07 am

I have a feeling that error is due to the pip version being used, but I will have to confirm. Give me a little time to investigate and I will get back to you.

We are working on bundling a new image that will work on pi2 by default, just taking some time as we are including updated/unreleased versions of the software with it and vetting out issues before pushing up to others.
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: packagefinder Error in Webapp

Postby kevin » Thu Apr 30, 2015 9:09 am

Yeah, at the moment to work with that newer pip version you will have to checkout the dev branch of alarmdecoder-webapp, as well as install these packages on top of nginx and gunicorn requirements: libffi-dev python-dev


so "git checkout dev" and "git pull" should sync you up with the dev branch, after you've installed those packages you should be fine to run "python manage.py initdb" - using "sudo" there might have issues with the user being able to write to database.
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: packagefinder Error in Webapp

Postby Jrdiver » Thu Apr 30, 2015 9:59 am

Thanks for the fast response. It seems to be setting up now except for saying that options will be ignored. Is this something I should be concerned with?

Code: Select all
pi@AlarmRbPi /opt/alarmdecoder-webapp $ python manage.py initdb
--------------------------------------------------------------------------------
INFO in decoder [/opt/alarmdecoder-webapp/ad2web/decoder.py:145]:
AlarmDecoder Webapp booting up - v0.3.1-8-gcaf7162
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
DEBUG in decoder [/opt/alarmdecoder-webapp/ad2web/decoder.py:155]:
Database is good!!!!!!
--------------------------------------------------------------------------------
/usr/local/lib/python2.7/dist-packages/flask_script/__init__.py:153: UserWarning: Options will be ignored.
  warnings.warn("Options will be ignored.")
Jrdiver
newt
newt
 
Posts: 7
Joined: Wed Apr 29, 2015 10:04 pm

Re: packagefinder Error in Webapp

Postby kevin » Thu Apr 30, 2015 10:09 am

Should be ok with that for now! Will investigate to see what that actually is when I have some time to - as long as things are working, shouldn't be an issue.
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: packagefinder Error in Webapp

Postby Jrdiver » Sat May 02, 2015 7:19 am

The good news is i have it so the web server is working...the bad news, it wont connect, just sits at "Device Testing."

EDIT:

Doing some more digging, using putty I am able to get a connection to the alarm. and view messages, updating with ready codes every 10 seconds or so. but with either the web server or ser2sock all i get is errors...web gives me a permission denied and ser2sock fails to start with code 1.

Connecting web directly to the serial, this repeats over and over
Code: Select all
raise NoDeviceError('Error opening device on {0}.'.format(self._port), err)
NoDeviceError: ('Error opening device on /dev/ttyAMA0.', OSError(13, 'Permission denied'))
2015-05-02 21:01:02,263 ERROR: Device not found: Error opening device on /dev/ttyAMA0. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:393]
2015-05-02 21:01:07,264 INFO: Attempting to reconnect to the AlarmDecoder [in /opt/alarmdecoder-webapp/ad2web/decoder.py:389]
2015-05-02 21:01:07,327 WARNING: Open failed: Error opening device on /dev/ttyAMA0. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:202]
Traceback (most recent call last):
File "/opt/alarmdecoder-webapp/ad2web/decoder.py", line 199, in open
self.device.open(baudrate=self._device_baudrate)
File "/usr/local/lib/python2.7/dist-packages/alarmdecoder-0.9.3-py2.7.egg/alarmdecoder/decoder.py", line 191, in open
self._device.open(baudrate=baudrate, no_reader_thread=no_reader_thread)
File "/usr/local/lib/python2.7/dist-packages/alarmdecoder-0.9.3-py2.7.egg/alarmdecoder/devices.py", line 697, in open


ser2sock
Code: Select all
Starting instantiation ser2sock of ser2sock...

Script name       : ser2sock
Executable file   : /usr/local/bin/ser2sock
Arguments         : -d -f /etc/ser2sock/ser2sock.conf -P /var/run/ser2sock.pid
Configuration file: /etc/ser2sock/ser2sock.conf
PID file          : /var/run/ser2sock.pid

Failed to start - Return Value = 1
Jrdiver
newt
newt
 
Posts: 7
Joined: Wed Apr 29, 2015 10:04 pm

Re: packagefinder Error in Webapp

Postby Jrdiver » Sun May 03, 2015 5:35 pm

Not sure what difference it makes but waiting a day seems to have fixed the ser2sock problem, although just before quitting last night i did change permissions on quite a few things. I'm able to connect from a pc with putty to the ser2sock now. The PC Desktop app can connect also but its read only at the moment...I'm remote desktoping into the computers that are part of this system (the pi and my desktop) and I think tomorrow I'll have to get on the first keypad and set up this virtual keypad in the alarm panel.

The Web App still isn't working but it seems like the pieces are slowly coming together.

EDIT: Web app is working now, just needed to reboot the pi. still need to config things panel side but itis picking up the ready, disarmed chime signals from the panel
Jrdiver
newt
newt
 
Posts: 7
Joined: Wed Apr 29, 2015 10:04 pm

Re: packagefinder Error in Webapp

Postby Jrdiver » Mon May 04, 2015 9:18 am

Last update for me for this project. Everything seems to be functioning now that i told the alarm panel that this thing exists and everything seems to be working now. It's interesting that all the virtual keypads you could ever want, all take up 1 actual keypad on the alarm. (Webapp has a fairly slow response time compared to the desktop app/actual keypad though.)
Jrdiver
newt
newt
 
Posts: 7
Joined: Wed Apr 29, 2015 10:04 pm

Re: packagefinder Error in Webapp

Postby kevin » Mon May 04, 2015 11:48 am

Glad you got it working. Yeah, it's to be expected that it is not as fast as the others, there's much more overhead in the webapp situation, plus everything is done via websockets so there's latency there too. Minor issue(s) at best, really!
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: packagefinder Error in Webapp

Postby kevin » Fri May 22, 2015 5:59 pm

Just FYI, the Pi 2 image has been released and is available on our Raspberry Pi page!
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Next

Return to General

Who is online

Users browsing this forum: No registered users and 40 guests

cron