kizniche / Mycodo

An environmental monitoring and regulation system
http://kylegabriel.com/projects/
GNU General Public License v3.0
2.99k stars 500 forks source link

500 Internal Server Error #332

Closed pewi81 closed 6 years ago

pewi81 commented 6 years ago

Mycodo Issue Report:

Problem Description

Please list: 500 Internal Server Error as I try to reach the web interface

Errors

pi@raspberrypi:~/Mycodo/install $ sudo apt-get install -y jq
Reading package lists... Done
Building dependency tree       
Reading state information... Done
jq is already the newest version (1.5+dfsg-1.3).
The following packages were automatically installed and are no longer required:
  libpython-all-dev python-all python-all-dev python-keyring python-keyrings.alt python-secretstorage python-wheel
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 129 not upgraded.
pi@raspberrypi:~/Mycodo/install $ cd ~
pi@raspberrypi:~ $ curl -s https://api.github.com/repos/kizniche/Mycodo/releases/latest | \
> jq -r '.tarball_url' | wget -i - -O mycodo-latest.tar.gz
--2017-11-26 20:51:34--  https://api.github.com/repos/kizniche/Mycodo/tarball/v5.4.8
Resolving api.github.com (api.github.com)... 192.30.253.116, 192.30.253.117
Connecting to api.github.com (api.github.com)|192.30.253.116|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/kizniche/Mycodo/legacy.tar.gz/v5.4.8 [following]
--2017-11-26 20:51:34--  https://codeload.github.com/kizniche/Mycodo/legacy.tar.gz/v5.4.8
Resolving codeload.github.com (codeload.github.com)... 192.30.253.121, 192.30.253.120
Connecting to codeload.github.com (codeload.github.com)|192.30.253.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7131693 (6.8M) [application/x-gzip]
Saving to: ‘mycodo-latest.tar.gz’

mycodo-latest.tar.gz             100%[=========================================================>]   6.80M  1.03MB/s    in 6.6s    

2017-11-26 20:51:42 (1.04 MB/s) - ‘mycodo-latest.tar.gz’ saved [7131693/7131693]

FINISHED --2017-11-26 20:51:42--
Total wall clock time: 8.5s
Downloaded: 1 files, 6.8M in 6.6s (1.04 MB/s)
pi@raspberrypi:~ $ mkdir Mycodo
mkdir: cannot create directory ‘Mycodo’: File exists
pi@raspberrypi:~ $ tar xzf mycodo-latest.tar.gz -C Mycodo --strip-components=1
tar: .github: Cannot utime: Operation not permitted
tar: .github: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: databases/alembic/versions: Cannot utime: Operation not permitted
tar: databases/alembic/versions: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: databases/alembic: Cannot utime: Operation not permitted
tar: databases/alembic: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: databases: Cannot utime: Operation not permitted
tar: databases: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: install: Cannot utime: Operation not permitted
tar: install: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: manual_images: Cannot utime: Operation not permitted
tar: manual_images: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/databases/models: Cannot utime: Operation not permitted
tar: mycodo/databases/models: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/databases: Cannot utime: Operation not permitted
tar: mycodo/databases: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/devices: Cannot utime: Operation not permitted
tar: mycodo/devices: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/inputs: Cannot utime: Operation not permitted
tar: mycodo/inputs: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/camera: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/camera: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/forms: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/forms: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/static/css/bootstrap-themes: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/static/css/bootstrap-themes: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/static/css: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/static/css: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/static/fonts: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/static/fonts: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/static/img: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/static/img: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/static/js/modules: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/static/js/modules: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/static/js: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/static/js: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/static: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/static: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/templates/admin: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/templates/admin: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/templates/pages/input_options: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/templates/pages/input_options: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/templates/pages/method_options: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/templates/pages/method_options: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/templates/pages/output_options: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/templates/pages/output_options: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/templates/pages/pid_options: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/templates/pages/pid_options: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/templates/pages/timer_options: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/templates/pages/timer_options: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/templates/pages: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/templates/pages: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/templates/remote: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/templates/remote: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/templates/settings/camera_options: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/templates/settings/camera_options: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/templates/settings: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/templates/settings: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/templates/tools: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/templates/tools: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/templates: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/templates: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/translations/es/LC_MESSAGES: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/translations/es/LC_MESSAGES: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/translations/es: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/translations/es: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/translations/fr/LC_MESSAGES: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/translations/fr/LC_MESSAGES: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/translations/fr: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/translations/fr: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/translations/ko/LC_MESSAGES: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/translations/ko/LC_MESSAGES: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/translations/ko: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/translations/ko: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/translations: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/translations: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask/utils: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask/utils: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/mycodo_flask: Cannot utime: Operation not permitted
tar: mycodo/mycodo_flask: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/scripts: Cannot utime: Operation not permitted
tar: mycodo/scripts: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/tests/manual_tests: Cannot utime: Operation not permitted
tar: mycodo/tests/manual_tests: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/tests/software_tests/factories: Cannot utime: Operation not permitted
tar: mycodo/tests/software_tests/factories: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/tests/software_tests/test_inputs: Cannot utime: Operation not permitted
tar: mycodo/tests/software_tests/test_inputs: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/tests/software_tests/test_mycodo_flask: Cannot utime: Operation not permitted
tar: mycodo/tests/software_tests/test_mycodo_flask: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/tests/software_tests: Cannot utime: Operation not permitted
tar: mycodo/tests/software_tests: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/tests: Cannot utime: Operation not permitted
tar: mycodo/tests: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo/utils: Cannot utime: Operation not permitted
tar: mycodo/utils: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: mycodo: Cannot utime: Operation not permitted
tar: mycodo: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: Exiting with failure status due to previous errors
pi@raspberrypi:~ $ rm -f mycodo-latest.tar.gz
pi@raspberrypi:~ $ cd Mycodo/install
pi@raspberrypi:~/Mycodo/install $ sudo /bin/bash ./setup.sh
### Mycodo installation beginning at 11-26-2017 20:51:44

#### Checking if swap size is 100 MB and needs to be changed to 512 MB
#### Swap not currently set to 100 MB. Not changing.

#### Updating apt repositories
Hit:1 http://mirrordirector.raspbian.org/raspbian stretch InRelease
Hit:2 http://archive.raspberrypi.org/debian stretch InRelease
Reading package lists...

#### Uninstalling apt version of pip (if installed)
Reading package lists...
Building dependency tree...
Reading state information...
Package 'python-pip' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  libpython-all-dev python-all python-all-dev python-keyring
  python-keyrings.alt python-secretstorage python-wheel
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 129 not upgraded.

#### Installing prerequisite apt packages and update pip
Hit:1 http://archive.raspberrypi.org/debian stretch InRelease
Hit:2 http://mirrordirector.raspbian.org/raspbian stretch InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.25-3+deb9u3).
gawk is already the newest version (1:4.1.4+dfsg-1).
gcc is already the newest version (4:6.3.0-4).
libapache2-mod-wsgi is already the newest version (4.5.11-1).
libboost-python-dev is already the newest version (1.62.0.1+b4).
libffi-dev is already the newest version (3.2.1-6).
libgtk2.0-0 is already the newest version (2.24.31-2).
libi2c-dev is already the newest version (3.1.2-3).
logrotate is already the newest version (3.11.0-0.1).
python-dev is already the newest version (2.7.13-2).
python-numpy is already the newest version (1:1.12.1-3).
python-opencv is already the newest version (2.4.9.1+dfsg1-2).
python-setuptools is already the newest version (33.1.1-1).
python-smbus is already the newest version (3.1.2-3).
sqlite3 is already the newest version (3.16.2-5).
The following packages were automatically installed and are no longer required:
  libpython-all-dev python-all python-all-dev python-keyring
  python-keyrings.alt python-secretstorage python-wheel
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libio-pty-perl libipc-run-perl
Suggested packages:
  git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk
  gitweb git-arch git-cvs git-mediawiki git-svn libtime-duration-perl
  libtimedate-perl
The following NEW packages will be installed:
  libio-pty-perl libipc-run-perl moreutils
The following packages will be upgraded:
  git libav-tools wget
apt-listchanges: Reading changelogs...
3 upgraded, 3 newly installed, 0 to remove and 126 not upgraded.
                                                                Need to get 0 B/4,404 kB of archives.
                                                                                                     After this operation, 552 kB of additional disk space will be used.
dpkg: warning: files list file for package 'python2.7-dev' missing; assuming package has no files currently installed
(Reading database ... 137358 files and directories currently installed.)
Preparing to unpack .../0-git_1%3a2.11.0-3+deb9u2_armhf.deb ...
Unpacking git (1:2.11.0-3+deb9u2) over (1:2.11.0-3) ...
Preparing to unpack .../1-wget_1.18-5+deb9u1_armhf.deb ...
Unpacking wget (1.18-5+deb9u1) over (1.18-5) ...
Preparing to unpack .../2-libav-tools_7%3a3.2.8-1~deb9u1_all.deb ...
Unpacking libav-tools (7:3.2.8-1~deb9u1) over (7:3.2.5-1) ...
Selecting previously unselected package libio-pty-perl.
Preparing to unpack .../3-libio-pty-perl_1%3a1.08-1.1+b2_armhf.deb ...
Unpacking libio-pty-perl (1:1.08-1.1+b2) ...
Selecting previously unselected package libipc-run-perl.
Preparing to unpack .../4-libipc-run-perl_0.94-1_all.deb ...
Unpacking libipc-run-perl (0.94-1) ...
Selecting previously unselected package moreutils.
Preparing to unpack .../5-moreutils_0.60-1_armhf.deb ...
Unpacking moreutils (0.60-1) ...
Setting up libio-pty-perl (1:1.08-1.1+b2) ...
Processing triggers for install-info (6.3.0.dfsg.1-1+b1) ...
Setting up libav-tools (7:3.2.8-1~deb9u1) ...
Setting up libipc-run-perl (0.94-1) ...
Setting up wget (1.18-5+deb9u1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up git (1:2.11.0-3+deb9u2) ...
Setting up moreutils (0.60-1) ...
Searching for pip
Best match: pip 9.0.1
Processing pip-9.0.1-py2.7.egg
pip 9.0.1 is already the active version in easy-install.pth
Installing pip script to /usr/local/bin
Installing pip2.7 script to /usr/local/bin
Installing pip2 script to /usr/local/bin

Using /usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg

#### Updating pip
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg
#### Virtualenv already exists, skipping creation

#### Installing gpiod
Archive:  pigpio.zip
   creating: PIGPIO/
  inflating: PIGPIO/setup.py         
  inflating: PIGPIO/command.h        
  inflating: PIGPIO/pigpiod.c        
  inflating: PIGPIO/pigpiod_if2.3    
  inflating: PIGPIO/pigs.c           
  inflating: PIGPIO/x_pigpiod_if.c   
  inflating: PIGPIO/pigpiod_if2.c    
  inflating: PIGPIO/pigpiod.1        
  inflating: PIGPIO/README           
  inflating: PIGPIO/command.c        
  inflating: PIGPIO/pigpio.h         
  inflating: PIGPIO/custom.cext      
  inflating: PIGPIO/pigpiod_if.h     
  inflating: PIGPIO/Makefile         
  inflating: PIGPIO/pig2vcd.c        
  inflating: PIGPIO/pigpio.py        
  inflating: PIGPIO/pigs.1           
  inflating: PIGPIO/pigpio.c         
  inflating: PIGPIO/x_pipe           
  inflating: PIGPIO/pigpiod_if.c     
  inflating: PIGPIO/UNLICENCE        
  inflating: PIGPIO/pigpio.3         
  inflating: PIGPIO/pigpiod_if2.h    
  inflating: PIGPIO/pigpiod_if.3     
  inflating: PIGPIO/pig2vcd.1        
  inflating: PIGPIO/x_pigpio.py      
  inflating: PIGPIO/MakeRemote       
  inflating: PIGPIO/x_pigpio.c       
  inflating: PIGPIO/x_pigpiod_if2.c  
  inflating: PIGPIO/x_pigs           
gcc -O3 -Wall -pthread -fpic -c -o pigpio.o pigpio.c
gcc -O3 -Wall -pthread -fpic -c -o command.o command.c
gcc -O3 -Wall -pthread -fpic -c -o pigpiod_if.o pigpiod_if.c
gcc -O3 -Wall -pthread -fpic -c -o pigpiod_if2.o pigpiod_if2.c
gcc -O3 -Wall -pthread   -c -o x_pigpio.o x_pigpio.c
gcc -O3 -Wall -pthread   -c -o x_pigpiod_if.o x_pigpiod_if.c
gcc -O3 -Wall -pthread   -c -o x_pigpiod_if2.o x_pigpiod_if2.c
gcc -O3 -Wall -pthread   -c -o pig2vcd.o pig2vcd.c
gcc -O3 -Wall -pthread   -c -o pigpiod.o pigpiod.c
gcc -O3 -Wall -pthread   -c -o pigs.o pigs.c
gcc -shared -o libpigpiod_if.so pigpiod_if.o command.o
gcc -shared -o libpigpiod_if2.so pigpiod_if2.o command.o
strip --strip-unneeded libpigpiod_if.so
size     libpigpiod_if.so
   text    data     bss     dec     hex filename
  59560    4296   49244  113100   1b9cc libpigpiod_if.so
gcc -o pig2vcd pig2vcd.o
strip --strip-unneeded libpigpiod_if2.so
size     libpigpiod_if2.so
   text    data     bss     dec     hex filename
  70263    4296    1984   76543   12aff libpigpiod_if2.so
gcc -o x_pigpiod_if x_pigpiod_if.o -L. -lpigpiod_if -pthread -lrt
gcc -o x_pigpiod_if2 x_pigpiod_if2.o -L. -lpigpiod_if2 -pthread -lrt
strip pig2vcd
gcc -o pigs pigs.o command.o
strip pigs
gcc -shared -o libpigpio.so pigpio.o command.o
strip --strip-unneeded libpigpio.so
size     libpigpio.so
   text    data     bss     dec     hex filename
 230579    5340  598336  834255   cbacf libpigpio.so
gcc -o x_pigpio x_pigpio.o -L. -lpigpio -pthread -lrt
gcc -o pigpiod pigpiod.o -L. -lpigpio -pthread -lrt
strip pigpiod
install -m 0755 -d                /opt/pigpio/cgi
install -m 0755 -d                /usr/local/include
install -m 0644 pigpio.h          /usr/local/include
install -m 0644 pigpiod_if.h      /usr/local/include
install -m 0644 pigpiod_if2.h     /usr/local/include
install -m 0755 -d                /usr/local/lib
install -m 0755 libpigpio.so      /usr/local/lib
install -m 0755 libpigpiod_if.so  /usr/local/lib
install -m 0755 libpigpiod_if2.so /usr/local/lib
install -m 0755 -d                /usr/local/bin
install -m 0755 pig2vcd           /usr/local/bin
install -m 0755 pigpiod           /usr/local/bin
install -m 0755 pigs              /usr/local/bin
if which python2; then python2 setup.py install; fi
/usr/bin/python2
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
copying pigpio.py -> build/lib.linux-armv7l-2.7
running install_lib
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/pigpio-1.38.egg-info
Writing /usr/local/lib/python2.7/dist-packages/pigpio-1.38.egg-info
if which python3; then python3 setup.py install; fi
/usr/bin/python3
running install
running build
running build_py
creating build/lib
copying pigpio.py -> build/lib
running install_lib
running install_egg_info
Removing /usr/local/lib/python3.5/dist-packages/pigpio-1.38.egg-info
Writing /usr/local/lib/python3.5/dist-packages/pigpio-1.38.egg-info
install -m 0755 -d                /usr/local/man/man1
install -m 0644 *.1               /usr/local/man/man1
install -m 0755 -d                /usr/local/man/man3
install -m 0644 *.3               /usr/local/man/man3
ldconfig
2017-11-26 20:55:48 initInitialise: Can't lock /var/run/pigpio.pid
Can't initialise pigpio library

#### Installing wiringpi
Cloning into '/home/pi/Mycodo/install/wiringPi'...
Checking out files: 100% (202/202), done.
wiringPi Build script
=====================

WiringPi Library
[UnInstall]
[Compile] wiringPi.c
[Compile] wiringShift.c
[Compile] wiringSerial.c
[Compile] piHiPri.c
[Compile] piThread.c
[Compile] wiringPiSPI.c
[Compile] wiringPiI2C.c
[Compile] softPwm.c
[Compile] softTone.c
[Compile] mcp23008.c
[Compile] mcp23016.c
[Compile] mcp23017.c
[Compile] mcp23s08.c
[Compile] mcp23s17.c
[Compile] sr595.c
[Compile] pcf8574.c
[Compile] pcf8591.c
[Compile] mcp3002.c
[Compile] mcp3004.c
[Compile] mcp4802.c
[Compile] mcp3422.c
[Compile] max31855.c
[Compile] max5322.c
[Compile] ads1115.c
wiringPi.c:1248:21: warning: ‘digitalWrite8Dummy’ defined but not used [-Wunused-function]
 static         void digitalWrite8Dummy       (UNU struct wiringPiNodeStruct *node, UNU int pin, UNU int value) { return ; }
                     ^~~~~~~~~~~~~~~~~~
wiringPi.c:1247:21: warning: ‘digitalRead8Dummy’ defined but not used [-Wunused-function]
 static unsigned int digitalRead8Dummy        (UNU struct wiringPiNodeStruct *node, UNU int UNU pin)            { return 0 ; }
                     ^~~~~~~~~~~~~~~~~
[Compile] sn3218.c
[Compile] bmp180.c
[Compile] htu21d.c
[Compile] ds18b20.c
[Compile] rht03.c
[Compile] drcSerial.c
[Compile] drcNet.c
[Compile] pseudoPins.c
[Compile] wpiExtensions.c
[Link (Dynamic)]
[Install Headers]
[Install Dynamic Lib]

WiringPi Devices Library
[UnInstall]
[Compile] ds1302.c
[Compile] piNes.c
[Compile] gertboard.c
[Compile] maxdetect.c
[Compile] piFace.c
[Compile] lcd128x64.c
[Compile] lcd.c
[Compile] scrollPhat.c
[Compile] piGlow.c
[Link (Dynamic)]
[Install Headers]
[Install Dynamic Lib]

GPIO Utility
[Compile] gpio.c
[Compile] readall.c
[Compile] pins.c
[Link]
[Install]

All Done.

NOTE: To compile programs with wiringPi, you need to add:
    -lwiringPi
  to your compile line(s) To use the Gertboard, MaxDetect, etc.
  code (the devLib), you need to also add:
    -lwiringPiDev
  to your compile line(s).

#### Installing pip requirements from requirements.txt
Requirement already up-to-date: pip in ./Mycodo/env/lib/python2.7/site-packages
Requirement already up-to-date: testfixtures in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 1))
Requirement already up-to-date: mock in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 2))
Requirement already up-to-date: pytest==3.2.3 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 3))
Requirement already up-to-date: factory_boy==2.8.1 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 4))
Requirement already up-to-date: future in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 5))
Requirement already up-to-date: alembic==0.9.6 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 6))
Collecting argparse==1.4.0 (from -r /home/pi/Mycodo/install/requirements.txt (line 7))
  Using cached argparse-1.4.0-py2.py3-none-any.whl
Requirement already up-to-date: bcrypt==3.1.4 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 8))
Requirement already up-to-date: daemonize==2.4.7 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 9))
Requirement already up-to-date: fasteners==0.14.1 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 10))
Requirement already up-to-date: Flask==0.12.2 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 11))
Requirement already up-to-date: Flask_Babel==0.11.2 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 12))
Requirement already up-to-date: Flask_InfluxDB==0.1 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 13))
Requirement already up-to-date: Flask_Limiter==1.0.0 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 14))
Requirement already up-to-date: Flask_Login==0.4.0 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 15))
Requirement already up-to-date: Flask_SQLAlchemy==2.2 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 16))
Requirement already up-to-date: Flask_SSLify in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 17))
Requirement already up-to-date: Flask_WTF==0.14.2 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 18))
Requirement already up-to-date: geocoder==1.32.1 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 19))
Requirement already up-to-date: imutils==0.4.3 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 20))
Requirement already up-to-date: influxdb==4.1.1 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 21))
Requirement already up-to-date: pi_switch==0.4.0 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 22))
Requirement already up-to-date: pyserial==3.4 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 23))
Requirement already up-to-date: python-dateutil in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 24))
Requirement already up-to-date: RPi.GPIO in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 25))
Requirement already up-to-date: rpyc==3.4.4 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 26))
Requirement already up-to-date: SQLAlchemy==1.2.0b3 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 27))
Requirement already up-to-date: WTForms==2.1 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 28))
Obtaining tsl2591 from git+git://github.com/maxlklaxl/python-tsl2591.git#egg=tsl2591 (from -r /home/pi/Mycodo/install/requirements.txt (line 31))
  Updating ./Mycodo/env/src/tsl2591 clone
Obtaining adafruit-bme280 from git+git://github.com/adafruit/Adafruit_Python_BME280.git#egg=adafruit-bme280 (from -r /home/pi/Mycodo/install/requirements.txt (line 32))
  Updating ./Mycodo/env/src/adafruit-bme280 clone
Requirement already up-to-date: picamera==1.13 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 33))
Requirement already up-to-date: sht_sensor==17.5.5 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 34))
Requirement already up-to-date: tentacle_pi==0.6.2 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 35))
Requirement already up-to-date: w1thermsensor==1.0.4 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 36))
Requirement already up-to-date: Adafruit_ADS1x15 in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 37))
Requirement already up-to-date: Adafruit_BMP in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 38))
Requirement already up-to-date: Adafruit_GPIO in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 39))
Requirement already up-to-date: Adafruit_TMP in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 40))
Requirement already up-to-date: MCP342x in ./Mycodo/env/lib/python2.7/site-packages (from -r /home/pi/Mycodo/install/requirements.txt (line 41))
Requirement already up-to-date: six>=1.9 in ./Mycodo/env/lib/python2.7/site-packages (from mock->-r /home/pi/Mycodo/install/requirements.txt (line 2))
Requirement already up-to-date: funcsigs>=1; python_version < "3.3" in ./Mycodo/env/lib/python2.7/site-packages (from mock->-r /home/pi/Mycodo/install/requirements.txt (line 2))
Requirement already up-to-date: pbr>=0.11 in ./Mycodo/env/lib/python2.7/site-packages (from mock->-r /home/pi/Mycodo/install/requirements.txt (line 2))
Collecting setuptools (from pytest==3.2.3->-r /home/pi/Mycodo/install/requirements.txt (line 3))
  Downloading setuptools-38.2.0-py2.py3-none-any.whl (489kB)
Collecting py>=1.4.33 (from pytest==3.2.3->-r /home/pi/Mycodo/install/requirements.txt (line 3))
  Downloading py-1.5.2-py2.py3-none-any.whl (88kB)
Collecting Faker>=0.7.0 (from factory_boy==2.8.1->-r /home/pi/Mycodo/install/requirements.txt (line 4))
  Downloading Faker-0.8.7-py2.py3-none-any.whl (691kB)
Requirement already up-to-date: python-editor>=0.3 in ./Mycodo/env/lib/python2.7/site-packages (from alembic==0.9.6->-r /home/pi/Mycodo/install/requirements.txt (line 6))
Requirement already up-to-date: Mako in ./Mycodo/env/lib/python2.7/site-packages (from alembic==0.9.6->-r /home/pi/Mycodo/install/requirements.txt (line 6))
Collecting cffi>=1.1 (from bcrypt==3.1.4->-r /home/pi/Mycodo/install/requirements.txt (line 8))
  Downloading cffi-1.11.2.tar.gz (435kB)
Collecting monotonic>=0.1 (from fasteners==0.14.1->-r /home/pi/Mycodo/install/requirements.txt (line 10))
  Downloading monotonic-1.4-py2.py3-none-any.whl
Requirement already up-to-date: itsdangerous>=0.21 in /usr/lib/python2.7/dist-packages (from Flask==0.12.2->-r /home/pi/Mycodo/install/requirements.txt (line 11))
Requirement already up-to-date: click>=2.0 in ./Mycodo/env/lib/python2.7/site-packages (from Flask==0.12.2->-r /home/pi/Mycodo/install/requirements.txt (line 11))
Requirement already up-to-date: Werkzeug>=0.7 in ./Mycodo/env/lib/python2.7/site-packages (from Flask==0.12.2->-r /home/pi/Mycodo/install/requirements.txt (line 11))
Collecting Jinja2>=2.4 (from Flask==0.12.2->-r /home/pi/Mycodo/install/requirements.txt (line 11))
  Downloading Jinja2-2.10-py2.py3-none-any.whl (126kB)
Requirement already up-to-date: Babel>=2.3 in ./Mycodo/env/lib/python2.7/site-packages (from Flask_Babel==0.11.2->-r /home/pi/Mycodo/install/requirements.txt (line 12))
Collecting limits (from Flask_Limiter==1.0.0->-r /home/pi/Mycodo/install/requirements.txt (line 14))
  Downloading limits-1.2.1-py2-none-any.whl
Requirement already up-to-date: requests in ./Mycodo/env/lib/python2.7/site-packages (from geocoder==1.32.1->-r /home/pi/Mycodo/install/requirements.txt (line 19))
Requirement already up-to-date: ratelim in ./Mycodo/env/lib/python2.7/site-packages (from geocoder==1.32.1->-r /home/pi/Mycodo/install/requirements.txt (line 19))
Collecting pytz (from influxdb==4.1.1->-r /home/pi/Mycodo/install/requirements.txt (line 21))
  Downloading pytz-2017.3-py2.py3-none-any.whl (511kB)
Requirement already up-to-date: plumbum in ./Mycodo/env/lib/python2.7/site-packages (from rpyc==3.4.4->-r /home/pi/Mycodo/install/requirements.txt (line 26))
Requirement already up-to-date: smbus-cffi in ./Mycodo/env/lib/python2.7/site-packages (from tsl2591->-r /home/pi/Mycodo/install/requirements.txt (line 31))
Requirement already up-to-date: adafruit-pureio in ./Mycodo/env/lib/python2.7/site-packages (from Adafruit_GPIO->-r /home/pi/Mycodo/install/requirements.txt (line 39))
Requirement already up-to-date: spidev in ./Mycodo/env/lib/python2.7/site-packages (from Adafruit_GPIO->-r /home/pi/Mycodo/install/requirements.txt (line 39))
Collecting text-unidecode (from Faker>=0.7.0->factory_boy==2.8.1->-r /home/pi/Mycodo/install/requirements.txt (line 4))
  Downloading text_unidecode-1.1-py2.py3-none-any.whl (77kB)
Requirement already up-to-date: ipaddress; python_version == "2.7" in ./Mycodo/env/lib/python2.7/site-packages (from Faker>=0.7.0->factory_boy==2.8.1->-r /home/pi/Mycodo/install/requirements.txt (line 4))
Requirement already up-to-date: MarkupSafe>=0.9.2 in ./Mycodo/env/lib/python2.7/site-packages (from Mako->alembic==0.9.6->-r /home/pi/Mycodo/install/requirements.txt (line 6))
Requirement already up-to-date: pycparser in ./Mycodo/env/lib/python2.7/site-packages (from cffi>=1.1->bcrypt==3.1.4->-r /home/pi/Mycodo/install/requirements.txt (line 8))
Requirement already up-to-date: urllib3<1.23,>=1.21.1 in ./Mycodo/env/lib/python2.7/site-packages (from requests->geocoder==1.32.1->-r /home/pi/Mycodo/install/requirements.txt (line 19))
Requirement already up-to-date: idna<2.7,>=2.5 in ./Mycodo/env/lib/python2.7/site-packages (from requests->geocoder==1.32.1->-r /home/pi/Mycodo/install/requirements.txt (line 19))
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in ./Mycodo/env/lib/python2.7/site-packages (from requests->geocoder==1.32.1->-r /home/pi/Mycodo/install/requirements.txt (line 19))
Collecting certifi>=2017.4.17 (from requests->geocoder==1.32.1->-r /home/pi/Mycodo/install/requirements.txt (line 19))
  Downloading certifi-2017.11.5-py2.py3-none-any.whl (330kB)
Requirement already up-to-date: decorator in ./Mycodo/env/lib/python2.7/site-packages (from ratelim->geocoder==1.32.1->-r /home/pi/Mycodo/install/requirements.txt (line 19))
Building wheels for collected packages: cffi
  Running setup.py bdist_wheel for cffi: started
  Running setup.py bdist_wheel for cffi: still running...
  Running setup.py bdist_wheel for cffi: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/a8/75/48/61f9b541f643e50c17955a605a83e9ef63dec4f12ca8f234a6
Successfully built cffi
Installing collected packages: argparse, tsl2591, adafruit-bme280, setuptools, py, text-unidecode, Faker, cffi, monotonic, Jinja2, limits, pytz, certifi
  Found existing installation: argparse 1.2.1
    Not uninstalling argparse at /usr/lib/python2.7, outside environment /home/pi/Mycodo/env
  Found existing installation: tsl2591 0.0.1
    Uninstalling tsl2591-0.0.1:
      Successfully uninstalled tsl2591-0.0.1
  Running setup.py develop for tsl2591
  Found existing installation: Adafruit-BME280 1.0
    Uninstalling Adafruit-BME280-1.0:
      Successfully uninstalled Adafruit-BME280-1.0
  Running setup.py develop for adafruit-bme280
  Found existing installation: setuptools 36.5.0
    Uninstalling setuptools-36.5.0:
      Successfully uninstalled setuptools-36.5.0
  Found existing installation: py 1.4.34
    Uninstalling py-1.4.34:
      Successfully uninstalled py-1.4.34
  Found existing installation: Faker 0.8.3
    Uninstalling Faker-0.8.3:
      Successfully uninstalled Faker-0.8.3
  Found existing installation: cffi 1.11.0
    Uninstalling cffi-1.11.0:
      Successfully uninstalled cffi-1.11.0
  Found existing installation: Jinja2 2.9.6
    Uninstalling Jinja2-2.9.6:
      Successfully uninstalled Jinja2-2.9.6
  Found existing installation: pytz 2017.2
    Uninstalling pytz-2017.2:
      Successfully uninstalled pytz-2017.2
  Found existing installation: certifi 2017.7.27.1
    Uninstalling certifi-2017.7.27.1:
      Successfully uninstalled certifi-2017.7.27.1
Successfully installed Faker-0.8.7 Jinja2-2.10 adafruit-bme280 argparse-1.4.0 certifi-2017.11.5 cffi-1.11.2 limits-1.2.1 monotonic-1.4 py-1.5.2 pytz-2017.3 setuptools-38.2.0 text-unidecode-1.1 tsl2591

#### Ensuring compatible version of influxdb is installed ####
#### Incorrect InfluxDB version (v1.3.3-1) installed. Installing v1.4.2-1...
dpkg: warning: files list file for package 'python2.7-dev' missing; assuming package has no files currently installed
(Reading database ... 137438 files and directories currently installed.)
Preparing to unpack influxdb_1.4.2_armhf.deb ...
Unpacking influxdb (1.4.2-1) over (1.3.3-1) ...
Setting up influxdb (1.4.2-1) ...
Installing new version of config file /etc/influxdb/influxdb.conf ...
Processing triggers for man-db (2.7.6.1-2) ...

#### Creating InfluxDB database and user
#### Attempting to connect...
#### Could not connect to Influxdb. Waiting 30 seconds then trying again...
#### Attempting to connect...
#### Influxdb database and user successfully created

#### Installing and configuring apache2 web server
Module wsgi already enabled
Considering dependency setenvif for ssl:
Module setenvif already enabled
Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Module socache_shmcb already enabled
Module ssl already enabled

#### Installing logrotate script
logrotate moved to cron.daily and logrotate script installed
#### Generating SSL certificates at /home/pi/Mycodo/mycodo/mycodo_flask/ssl_certs (replace with your own if desired)
Generating RSA private key, 4096 bit long modulus
....................................................................................................................++
.............................................................................................................................................................................................++
e is 65537 (0x010001)
writing RSA key
Signature ok
subject=O = mycodo, OU = mycodo, CN = mycodo
Getting Private key

#### Enabling mycodo startup script
Removed /etc/systemd/system/multi-user.target.wants/mycodo.service.
Removed /etc/systemd/system/mycodo.service.
Created symlink /etc/systemd/system/mycodo.service → /home/pi/Mycodo/install/mycodo.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mycodo.service → /home/pi/Mycodo/install/mycodo.service.

#### Compiling Translations
compiling catalog mycodo_flask/translations/ko/LC_MESSAGES/messages.po to mycodo_flask/translations/ko/LC_MESSAGES/messages.mo
compiling catalog mycodo_flask/translations/fr/LC_MESSAGES/messages.po to mycodo_flask/translations/fr/LC_MESSAGES/messages.mo
compiling catalog mycodo_flask/translations/es/LC_MESSAGES/messages.po to mycodo_flask/translations/es/LC_MESSAGES/messages.mo

#### Updating Mycodo crontab entry
Removing crontab entry ...
Appending to crontab:
-----------------------------------------------
@reboot /usr/local/bin/pigpiod -s 1 &
-----------------------------------------------
To remove previously added crontab entry, run: /home/pi/Mycodo/install/crontab.sh mycodo --remove

#### Updating Mycodo restart monitor crontab entry
Removing crontab entry ...
Appending to crontab:
-----------------------------------------------
@reboot /var/www/mycodo/mycodo/scripts/restart_daemon.py --continuouscheck &
-----------------------------------------------
To remove previously added crontab entry, run: /home/pi/Mycodo/install/crontab.sh restart_daemon --remove

#### Compiling mycodo_wrapper

#### Creating users and directories
useradd: user 'mycodo' already exists
The user `mycodo' is already a member of `gpio'.
The user `mycodo' is already a member of `adm'.
The user `mycodo' is already a member of `video'.
The user `mycodo' is already a member of `dialout'.

#### Setting permissions

#### Restarting the Mycodo web server

#### Creating Mycodo database if it doesn't exist
#### Could not connect to http://localhost. Waiting 60 seconds then trying again...
#### Trying again...
#### Could not connect to http://localhost. Waiting 60 seconds then trying again...
#### Trying again...
#### Could not connect to http://localhost. Waiting 60 seconds then trying again...
#### Trying again...
#### Could not connect to http://localhost. Waiting 60 seconds then trying again...
#### Trying again...
#### Could not connect to http://localhost. Waiting 60 seconds then trying again...
#### Trying again...

#### Setting permissions

#### Restarting the Mycodo daemon
Mycodo previously shut down properly
Sun 26 Nov 21:08:43 CET 2017

***************************************************
** Mycodo successfully installed without errors! **
***************************************************

Go to https://192.168.1.104/, or whatever your Pi's
IP address is, to create an admin user and log in.

Steps to Reproduce the issue:

How can this issue be reproduced?

  1. step 1
  2. step 2...
  3. etc

Additional Notes

Is there anything that should be added to make it easier to address this issue?

pewi81 commented 6 years ago

Code looks terrible but I tried to add it as code without success!

kizniche commented 6 years ago

restart flask in debug mode then try to visit the web interface to see the specific error.

I installed the latest Mycodo on the latest Raspbian on a Pi 2 an hour ago, without issue, so I think it is a pip package that didn't compile correctly, bad filesystem/corrupt files, or something.

kizniche commented 6 years ago

Also, multi-line code should be encased in three backtics (```) to format it correctly, like the following:

``` code goes here ```

kizniche commented 6 years ago

I see you already had the Mycodo directory, and a bunch of errors after that:

pi@raspberrypi:~ $ mkdir Mycodo
mkdir: cannot create directory ‘Mycodo’: File exists
...
pewi81 commented 6 years ago

The debug thing didn't work!

kizniche commented 6 years ago

Please elaborate

pewi81 commented 6 years ago

The commands returns this in the terminal:


[ ok ] Stopping apache2 (via systemctl): apache2.service.
pi@raspberrypi:~ $ sudo ~/Mycodo/env/bin/python ~/Mycodo/mycodo/mycodo_flask/start_flask_ui.py --debug
/home/pi/Mycodo/env/bin/python: can't open file '/home/pi/Mycodo/mycodo/mycodo_flask/start_flask_ui.py': [Errno 2] No such file or directory```
kizniche commented 6 years ago

See my previous comment about you already having a Mycodo directory and the errors after that. Your issues probably stem from that.

kizniche commented 6 years ago

Also, there was a typo in the command. I've updated the wiki to reflect the proper command.

pewi81 commented 6 years ago

Since I couldn't figure a way round this I erased the Mycodo dir and made a fresh install!