Git Product home page Git Product logo

astro-pi-kvadda-19-20's Introduction

Astro-pi-kvadda

CodeFactor

Mission

  • Measure the vegetation on different spots on Earth in the ISS flight path, and try to - calculate the carbon dioxide from the vegetation.
  • Then if possible, compare these data with previously collected data.
  • We hope to be able to investigate the magnetic field, too see if we can find a relation to geology.

Who are we

  • Isak Sødal - Vg1 Engineering road
  • Albert Salvesen-Orø - Vg1 Engineering road
  • William Årnes Kristensen - Vg1 Electricity
  • Lasse Junker Jensen - Vg2 Computers and electronics
  • Mats Andreas Tønnesland - Vg2 Engineering road
  • Pyotr Karbovskiy-Kjellman - Vg2 Engineering road

Sources

astro-pi-kvadda-19-20's People

Contributors

alberts-o avatar blodroed avatar deepsourcebot avatar matsandt avatar pytato-kk avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

kvapehe

astro-pi-kvadda-19-20's Issues

TypeError: 'tuple' object is not callable

error bad: Traceback (most recent call last):
  File "main.py", line 129, in remove_bad_score_img
    bad_row = self.data_manager.get_bad_score()
  File "/home/pi/AstroPi/astro-master/data_manager/data_manager.py", line 123, in get_bad_score
    row = cur.fetchone()()
TypeError: 'tuple' object is not callable

Can not find img to delit

Terminal error

Could not find image attempt two file: [Errno 2] No such file or directory: '/home/pi/AstroPi/astro-master/data/imgs/480.jpg'
Deleting row with id: 481
INFO:2020-02-13 14:45:27,378:__main__:manager:On cycle2469
INFO:2020-02-13 14:45:27,378:__main__:manager:Getting compass
INFO:2020-02-13 14:45:27,397:__main__:manager:Getting img
INFO:2020-02-13 14:45:27,399:__main__:get_img:Captured image
INFO:2020-02-13 14:45:28,433:__main__:manager:Save to db
INFO:2020-02-13 14:45:29,613:__main__:manager:Remove bad img
INFO:2020-02-13 14:45:29,616:__main__:remove_bad_score_img:Bad id: 482, Bad img name: 481
Could not find image file: [Errno 2] No such file or directory: '/home/pi/AstroPi/astro-master/data/imgs/481.jpg'
Could not find image attempt two file: [Errno 2] No such file or directory: '/home/pi/AstroPi/astro-master/data/imgs/481.jpg'
Deleting row with id: 482
INFO:2020-02-13 14:45:32,962:__main__:manager:On cycle2470
INFO:2020-02-13 14:45:32,963:__main__:manager:Getting compass
INFO:2020-02-13 14:45:32,981:__main__:manager:Getting img
INFO:2020-02-13 14:45:32,983:__main__:get_img:Captured image
INFO:2020-02-13 14:45:34,035:__main__:manager:Save to db
INFO:2020-02-13 14:45:35,238:__main__:manager:Remove bad img
INFO:2020-02-13 14:45:35,241:__main__:remove_bad_score_img:Bad id: 483, Bad img name: 482
Could not find image file: [Errno 2] No such file or directory: '/home/pi/AstroPi/astro-master/data/imgs/482.jpg'
Could not find image attempt two file: [Errno 2] No such file or directory: '/home/pi/AstroPi/astro-master/data/imgs/482.jpg'
Deleting row with id: 483
INFO:2020-02-13 14:45:38,585:__main__:manager:On cycle2471
INFO:2020-02-13 14:45:38,585:__main__:manager:Getting compass
INFO:2020-02-13 14:45:38,604:__main__:manager:Getting img
INFO:2020-02-13 14:45:38,605:__main__:get_img:Captured image
INFO:2020-02-13 14:45:39,620:__main__:manager:Save to db
INFO:2020-02-13 14:45:40,828:__main__:manager:Remove bad img
INFO:2020-02-13 14:45:40,831:__main__:remove_bad_score_img:Bad id: 484, Bad img name: 483
Could not find image file: [Errno 2] No such file or directory: '/home/pi/AstroPi/astro-master/data/imgs/483.jpg'
Could not find image attempt two file: [Errno 2] No such file or directory: '/home/pi/AstroPi/astro-master/data/imgs/483.jpg'
Deleting row with id: 484
INFO:2020-02-13 14:45:46,638:__main__:manager:On cycle2472
INFO:2020-02-13 14:45:46,639:__main__:manager:Getting compass
INFO:2020-02-13 14:45:46,658:__main__:manager:Getting img
INFO:2020-02-13 14:45:46,659:__main__:get_img:Captured image
INFO:2020-02-13 14:45:47,690:__main__:manager:Save to db
INFO:2020-02-13 14:45:48,880:__main__:manager:Remove bad img
INFO:2020-02-13 14:45:48,883:__main__:remove_bad_score_img:Bad id: 485, Bad img name: 484
Could not find image file: [Errno 2] No such file or directory: '/home/pi/AstroPi/astro-master/data/imgs/484.jpg'
Could not find image attempt two file: [Errno 2] No such file or directory: '/home/pi/AstroPi/astro-master/data/imgs/484.jpg'
Deleting row with id: 485

AttributeError: 'DataManager' object has no attribute 'conn'

pi@raspberrypi:~/AstroPi/Astro-pi-kvadda $ python3 main.py
Cannot connect to db: Traceback (most recent call last):
  File "/home/pi/AstroPi/Astro-pi-kvadda/data_manager/data_manager.py", line 21, in __init__
    self.conn = sqlite3.connect(self.db_name)
sqlite3.OperationalError: unable to open database file

Traceback (most recent call last):
  File "/home/pi/AstroPi/Astro-pi-kvadda/data_manager/data_manager.py", line 46, in create_table
    c = self.conn.cursor()
AttributeError: 'DataManager' object has no attribute 'conn'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 138, in <module>
    main()
  File "main.py", line 57, in __init__
    self.data_manager.create_table()  # TODO: if false (error) return
  File "/home/pi/AstroPi/Astro-pi-kvadda/data_manager/data_manager.py", line 58, in create_table
    if self.conn.execute(table_exists).fetchone() and isinstance(e, sqlite3.OperationalError):
AttributeError: 'DataManager' object has no attribute 'conn'

TypeError: Level not an integer or a valid string

Terminal

Traceback (most recent call last):
  File "main.py", line 46, in <module>
    outputhandler.setLevel(logging.info)
  File "/usr/lib/python3.7/logging/__init__.py", line 867, in setLevel
    self.level = _checkLevel(level)
  File "/usr/lib/python3.7/logging/__init__.py", line 195, in _checkLevel
    raise TypeError("Level not an integer or a valid string: %r" % level)
TypeError: Level not an integer or a valid string: <function info at 0x7683b0c0>

get_img:Could not get image

Error

CRITICAL:2020-02-05 14:26:27,376:__main__:get_img:Could not get image: Traceback (most recent call last):
  File "main.py", line 79, in get_img
    img = image.Image.capture_image()
  File "/home/pi/AstroPi/Astro-pi-kvadda/image/image.py", line 133, in capture_image
    return cls(cv2.imread(path))
  File "/home/pi/AstroPi/Astro-pi-kvadda/image/image.py", line 31, in __init__
    raise TypeError('Expected image, not {}'.format(type(image)))
TypeError: Expected image, not <class 'NoneType'>

Log

INFO:2020-02-05 14:26:25,492:__main__:__init__:main init
DEBUG:2020-02-05 14:26:25,604:__main__:__init__:function main init end
INFO:2020-02-05 14:26:25,605:__main__:manager:function manager start
DEBUG:2020-02-05 14:26:25,606:__main__:get_compass:function get_compass start
INFO:2020-02-05 14:26:25,606:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 14:26:25,723:__main__:get_img:function get_img start
INFO:2020-02-05 14:26:25,723:__main__:get_img:Captured image
CRITICAL:2020-02-05 14:26:27,376:__main__:get_img:Could not get image: Traceback (most recent call last):
  File "main.py", line 79, in get_img
    img = image.Image.capture_image()
  File "/home/pi/AstroPi/Astro-pi-kvadda/image/image.py", line 133, in capture_image
    return cls(cv2.imread(path))
  File "/home/pi/AstroPi/Astro-pi-kvadda/image/image.py", line 31, in __init__
    raise TypeError('Expected image, not {}'.format(type(image)))
TypeError: Expected image, not <class 'NoneType'>

INFO:2020-02-05 14:26:27,376:__main__:get_img:Captured image
CRITICAL:2020-02-05 14:26:28,099:__main__:get_img:Could not get image: Traceback (most recent call last):
  File "main.py", line 79, in get_img
    img = image.Image.capture_image()
  File "/home/pi/AstroPi/Astro-pi-kvadda/image/image.py", line 133, in capture_image
    return cls(cv2.imread(path))
  File "/home/pi/AstroPi/Astro-pi-kvadda/image/image.py", line 31, in __init__
    raise TypeError('Expected image, not {}'.format(type(image)))
TypeError: Expected image, not <class 'NoneType'>

INFO:2020-02-05 14:26:28,100:__main__:get_img:Captured image
CRITICAL:2020-02-05 14:26:30,429:__main__:get_img:Could not get image: Traceback (most recent call last):
  File "main.py", line 79, in get_img
    img = image.Image.capture_image()
  File "/home/pi/AstroPi/Astro-pi-kvadda/image/image.py", line 133, in capture_image
    return cls(cv2.imread(path))
  File "/home/pi/AstroPi/Astro-pi-kvadda/image/image.py", line 31, in __init__
    raise TypeError('Expected image, not {}'.format(type(image)))
TypeError: Expected image, not <class 'NoneType'>

DEBUG:2020-02-05 14:26:30,429:__main__:get_img:function get_img end
INFO:2020-02-05 14:26:30,433:__main__:stop_prosses:function stop_prosess start



Unable to allocate array with shape (1944, 2592) and data type float64

Terminal Error

Traceback (most recent call last):
  File "main.py", line 143, in <module>
    main().manager()
  File "main.py", line 139, in manager
    self.manager()
  File "main.py", line 139, in manager
    self.manager()
  File "main.py", line 139, in manager
    self.manager()
  [Previous line repeated 9 more times]
  File "main.py", line 133, in manager
    self.save_to_db(img.id, img.score, compass_list)
  File "/home/pi/AstroPi/Astro-pi-kvadda/image/image.py", line 82, in score
    ndvi_average = cv2.mean(self.ndvi)[0]
  File "/home/pi/AstroPi/Astro-pi-kvadda/image/image.py", line 61, in ndvi
    top = near_ir.astype(float) - blue.astype(float)
numpy.core._exceptions.MemoryError: Unable to allocate array with shape (1944, 2592) and data type float64

Log

INFO:2020-02-05 19:49:33,586:__main__:__init__:main init
INFO:2020-02-05 19:49:33,587:__main__:__init__:Data path not exist, create folders
DEBUG:2020-02-05 19:49:34,864:__main__:__init__:function main init end
INFO:2020-02-05 19:49:34,865:__main__:manager:function manager start
DEBUG:2020-02-05 19:49:34,865:__main__:get_compass:function get_compass start
INFO:2020-02-05 19:49:34,865:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 19:49:34,990:__main__:get_img:function get_img start
INFO:2020-02-05 19:49:34,990:__main__:get_img:Captured image
DEBUG:2020-02-05 19:49:38,726:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 19:49:38,726:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 19:49:38,769:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 19:49:38,769:__main__:manager:function manager end
INFO:2020-02-05 19:49:38,770:__main__:manager:function manager start
DEBUG:2020-02-05 19:49:38,770:__main__:get_compass:function get_compass start
INFO:2020-02-05 19:49:38,770:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 19:49:38,782:__main__:get_img:function get_img start
INFO:2020-02-05 19:49:38,782:__main__:get_img:Captured image
DEBUG:2020-02-05 19:49:40,766:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 19:49:40,766:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 19:49:40,820:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 19:49:40,821:__main__:manager:function manager end
INFO:2020-02-05 19:49:40,821:__main__:manager:function manager start
DEBUG:2020-02-05 19:49:40,821:__main__:get_compass:function get_compass start
INFO:2020-02-05 19:49:40,822:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 19:49:40,834:__main__:get_img:function get_img start
INFO:2020-02-05 19:49:40,834:__main__:get_img:Captured image
DEBUG:2020-02-05 19:49:42,806:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 19:49:42,806:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 19:49:42,847:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 19:49:42,847:__main__:manager:function manager end
INFO:2020-02-05 19:49:42,847:__main__:manager:function manager start
DEBUG:2020-02-05 19:49:42,848:__main__:get_compass:function get_compass start
INFO:2020-02-05 19:49:42,848:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 19:49:42,860:__main__:get_img:function get_img start
INFO:2020-02-05 19:49:42,860:__main__:get_img:Captured image
DEBUG:2020-02-05 19:49:44,828:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 19:49:44,828:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 19:49:44,885:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 19:49:44,885:__main__:manager:function manager end
INFO:2020-02-05 19:49:44,885:__main__:manager:function manager start
DEBUG:2020-02-05 19:49:44,886:__main__:get_compass:function get_compass start
INFO:2020-02-05 19:49:44,886:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 19:49:44,898:__main__:get_img:function get_img start
INFO:2020-02-05 19:49:44,898:__main__:get_img:Captured image
DEBUG:2020-02-05 19:49:46,805:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 19:49:46,805:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 19:49:47,569:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 19:49:47,570:__main__:manager:function manager end
INFO:2020-02-05 19:49:47,570:__main__:manager:function manager start
DEBUG:2020-02-05 19:49:47,571:__main__:get_compass:function get_compass start
INFO:2020-02-05 19:49:47,571:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 19:49:47,589:__main__:get_img:function get_img start
INFO:2020-02-05 19:49:47,589:__main__:get_img:Captured image
DEBUG:2020-02-05 19:49:49,734:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 19:49:49,735:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 19:49:49,818:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 19:49:49,819:__main__:manager:function manager end
INFO:2020-02-05 19:49:49,819:__main__:manager:function manager start
DEBUG:2020-02-05 19:49:49,819:__main__:get_compass:function get_compass start
INFO:2020-02-05 19:49:49,820:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 19:49:49,831:__main__:get_img:function get_img start
INFO:2020-02-05 19:49:49,832:__main__:get_img:Captured image
DEBUG:2020-02-05 19:49:51,772:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 19:49:51,773:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 19:49:51,838:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 19:49:51,839:__main__:manager:function manager end
INFO:2020-02-05 19:49:51,839:__main__:manager:function manager start
DEBUG:2020-02-05 19:49:51,839:__main__:get_compass:function get_compass start
INFO:2020-02-05 19:49:51,840:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 19:49:51,852:__main__:get_img:function get_img start
INFO:2020-02-05 19:49:51,852:__main__:get_img:Captured image
DEBUG:2020-02-05 19:49:53,779:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 19:49:53,779:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 19:49:53,837:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 19:49:53,837:__main__:manager:function manager end
INFO:2020-02-05 19:49:53,837:__main__:manager:function manager start
DEBUG:2020-02-05 19:49:53,838:__main__:get_compass:function get_compass start
INFO:2020-02-05 19:49:53,838:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 19:49:53,850:__main__:get_img:function get_img start
INFO:2020-02-05 19:49:53,850:__main__:get_img:Captured image
DEBUG:2020-02-05 19:49:55,836:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 19:49:55,837:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 19:49:55,879:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 19:49:55,880:__main__:manager:function manager end
INFO:2020-02-05 19:49:55,880:__main__:manager:function manager start
DEBUG:2020-02-05 19:49:55,880:__main__:get_compass:function get_compass start
INFO:2020-02-05 19:49:55,880:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 19:49:55,892:__main__:get_img:function get_img start
INFO:2020-02-05 19:49:55,893:__main__:get_img:Captured image
DEBUG:2020-02-05 19:49:59,247:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 19:49:59,249:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 19:50:02,506:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 19:50:02,507:__main__:manager:function manager end
INFO:2020-02-05 19:50:02,508:__main__:manager:function manager start
DEBUG:2020-02-05 19:50:02,508:__main__:get_compass:function get_compass start
INFO:2020-02-05 19:50:02,509:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 19:50:02,527:__main__:get_img:function get_img start
INFO:2020-02-05 19:50:02,528:__main__:get_img:Captured image
DEBUG:2020-02-05 19:50:04,676:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 19:50:04,677:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 19:50:06,803:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 19:50:06,804:__main__:manager:function manager end
INFO:2020-02-05 19:50:06,805:__main__:manager:function manager start
DEBUG:2020-02-05 19:50:06,805:__main__:get_compass:function get_compass start
INFO:2020-02-05 19:50:06,806:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 19:50:06,823:__main__:get_img:function get_img start
INFO:2020-02-05 19:50:06,824:__main__:get_img:Captured image
DEBUG:2020-02-05 19:50:24,231:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 19:50:24,248:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 19:50:24,424:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 19:50:24,425:__main__:manager:function manager end
INFO:2020-02-05 19:50:24,425:__main__:manager:function manager start
DEBUG:2020-02-05 19:50:24,426:__main__:get_compass:function get_compass start
INFO:2020-02-05 19:50:24,426:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 19:50:24,455:__main__:get_img:function get_img start
INFO:2020-02-05 19:50:24,456:__main__:get_img:Captured image
INFO:2020-02-05 19:51:09,862:__main__:stop_prosses:function stop_prosess start

NameError: name 'Image' is not defined

INFO:2020-02-05 13:59:00,963:__main__:get_img:Captured image
CRITICAL:2020-02-05 13:59:00,963:__main__:get_img:Could not get image: Traceback (most recent call last):
  File "main.py", line 79, in get_img
    img = Image.capture_image()
NameError: name 'Image' is not defined

Deleting old images when full not working

Terminal Error

It was like the img did not have a id

Log Error / Log

INFO:2020-02-07 10:53:30,043:__main__:manager:On cycle1558
DEBUG:2020-02-07 10:53:30,044:__main__:get_compass:function get_compass start
INFO:2020-02-07 10:53:30,044:__main__:get_compass:Returned compass info
DEBUG:2020-02-07 10:53:30,062:__main__:get_img:function get_img start
INFO:2020-02-07 10:53:30,062:__main__:get_img:Captured image
CRITICAL:2020-02-07 10:53:30,823:__main__:get_img:Could not get image: Traceback (most recent call last):
  File "main.py", line 85, in get_img
    img = image.Image.capture_image()
  File "/home/pi/AstroPi/astro-memory/image/image.py", line 130, in capture_image
    picam.capture("{}{}.jpg".format(path, id))
  File "/usr/lib/python3/dist-packages/picamera/camera.py", line 1421, in capture
    if not encoder.wait(self.CAPTURE_TIMEOUT):
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 398, in wait
    raise self.exception
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 267, in _callback
    stop = self._callback_write(buf)
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 1019, in _callback_write
    super(PiOneImageEncoder, self)._callback_write(buf, key)
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 298, in _callback_write
    written = output.write(buf.data)
OSError: [Errno 28] No space left on device

INFO:2020-02-07 10:53:30,824:__main__:get_img:Captured image
CRITICAL:2020-02-07 10:53:31,565:__main__:get_img:Could not get image: Traceback (most recent call last):
  File "main.py", line 85, in get_img
    img = image.Image.capture_image()
  File "/home/pi/AstroPi/astro-memory/image/image.py", line 130, in capture_image
    picam.capture("{}{}.jpg".format(path, id))
  File "/usr/lib/python3/dist-packages/picamera/camera.py", line 1421, in capture
    if not encoder.wait(self.CAPTURE_TIMEOUT):
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 398, in wait
    raise self.exception
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 267, in _callback
    stop = self._callback_write(buf)
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 1019, in _callback_write
    super(PiOneImageEncoder, self)._callback_write(buf, key)
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 298, in _callback_write
    written = output.write(buf.data)
OSError: [Errno 28] No space left on device

INFO:2020-02-07 10:53:31,565:__main__:get_img:Captured image
CRITICAL:2020-02-07 10:53:32,393:__main__:get_img:Could not get image: Traceback (most recent call last):
  File "main.py", line 85, in get_img
    img = image.Image.capture_image()
  File "/home/pi/AstroPi/astro-memory/image/image.py", line 130, in capture_image
    picam.capture("{}{}.jpg".format(path, id))
  File "/usr/lib/python3/dist-packages/picamera/camera.py", line 1421, in capture
    if not encoder.wait(self.CAPTURE_TIMEOUT):
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 398, in wait
    raise self.exception
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 267, in _callback
    stop = self._callback_write(buf)
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 1019, in _callback_write
    super(PiOneImageEncoder, self)._callback_write(buf, key)
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 298, in _callback_write
    written = output.write(buf.data)
OSError: [Errno 28] No space left on device


DEBUG:2020-02-07 10:53:32,394:__main__:get_img:function get_img end
INFO:2020-02-07 10:53:32,399:__main__:stop_prosses:function stop_prosess start

The issue could be that the sd card is too small and not the data have existed 3 GB.

FileNotFoundError: [Errno 2] No such file or directory: './data/imgs/1.jpg'

INFO:2020-02-05 14:15:56,805:__main__:get_img:Captured image
CRITICAL:2020-02-05 14:15:56,830:__main__:get_img:Could not get image: Traceback (most recent call last):
  File "main.py", line 79, in get_img
    img = image.Image.capture_image()
  File "/home/pi/AstroPi/Astro-pi-kvadda/image/image.py", line 130, in capture_image
    picam.capture("{}{}.jpg".format(path, id + 1))
  File "/usr/lib/python3/dist-packages/picamera/camera.py", line 1418, in capture
    encoder.start(output)
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 1126, in start
    super(PiCookedOneImageEncoder, self).start(output)
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 375, in start
    self._open_output(output)
  File "/usr/lib/python3/dist-packages/picamera/encoders.py", line 331, in _open_output
    self.outputs[key] = mo.open_stream(output)
  File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 344, in open_stream
    stream = io.open(stream, 'wb' if output else 'rb', buffering)
FileNotFoundError: [Errno 2] No such file or directory: './data/imgs/1.jpg'

Singal Error

Traceback (most recent call last): File "main.py", line 137, in <module> main() File "main.py", line 48, in __init__ signal.signal(signal.SIGSTOP, self.stop_prosses) File "/usr/lib/python3.7/signal.py", line 47, in signal handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler)) OSError: [Errno 22] Invalid argument

No feedback in terminal

When I run the code in the terminal I can not see how it is doing, I want to see what cycles it is on.

How is the process stoped

On the ISS, will the program just been terminated or si a SIGSTOP signal sent?

Se the Astro Pi forum, Astro pi support, Github for Astro pi

Incorrect number of bindings supplied. The current statement uses 5, and there are 6 supplied.

Terminal Error

Could not insert data: Traceback (most recent call last):
  File "/home/pi/AstroPi/Astro-pi-kvadda/data_manager/data_manager.py", line 94, in insert_data
    magnetometer["z"], magnetometer["y"], magnetometer["x"]))
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 5, and there are 6 supplied.

Log Error


Log

INFO:2020-02-05 15:26:18,510:__main__:__init__:main init
INFO:2020-02-05 15:26:18,511:__main__:__init__:Data path not exist, create folders
DEBUG:2020-02-05 15:26:18,686:__main__:__init__:function main init end
INFO:2020-02-05 15:26:18,687:__main__:manager:function manager start
DEBUG:2020-02-05 15:26:18,687:__main__:get_compass:function get_compass start
INFO:2020-02-05 15:26:18,687:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 15:26:18,803:__main__:get_img:function get_img start
INFO:2020-02-05 15:26:18,803:__main__:get_img:Captured image
DEBUG:2020-02-05 15:26:20,858:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 15:26:20,858:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 15:26:20,861:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 15:26:20,862:__main__:manager:function manager end
INFO:2020-02-05 15:26:20,862:__main__:manager:function manager start
DEBUG:2020-02-05 15:26:20,862:__main__:get_compass:function get_compass start
INFO:2020-02-05 15:26:20,862:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 15:26:20,874:__main__:get_img:function get_img start
INFO:2020-02-05 15:26:20,875:__main__:get_img:Captured image
DEBUG:2020-02-05 15:26:22,904:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 15:26:22,905:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 15:26:22,906:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 15:26:22,906:__main__:manager:function manager end
INFO:2020-02-05 15:26:22,907:__main__:manager:function manager start
DEBUG:2020-02-05 15:26:22,907:__main__:get_compass:function get_compass start
INFO:2020-02-05 15:26:22,907:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 15:26:22,919:__main__:get_img:function get_img start
INFO:2020-02-05 15:26:22,919:__main__:get_img:Captured image
DEBUG:2020-02-05 15:26:24,868:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 15:26:24,869:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 15:26:24,870:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 15:26:24,870:__main__:manager:function manager end
INFO:2020-02-05 15:26:24,871:__main__:manager:function manager start
DEBUG:2020-02-05 15:26:24,871:__main__:get_compass:function get_compass start
INFO:2020-02-05 15:26:24,871:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 15:26:24,883:__main__:get_img:function get_img start
INFO:2020-02-05 15:26:24,884:__main__:get_img:Captured image
DEBUG:2020-02-05 15:26:26,980:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 15:26:26,980:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 15:26:26,981:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 15:26:26,982:__main__:manager:function manager end
INFO:2020-02-05 15:26:26,982:__main__:manager:function manager start
DEBUG:2020-02-05 15:26:26,982:__main__:get_compass:function get_compass start
INFO:2020-02-05 15:26:26,983:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 15:26:26,995:__main__:get_img:function get_img start
INFO:2020-02-05 15:26:26,995:__main__:get_img:Captured image
DEBUG:2020-02-05 15:26:29,004:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 15:26:29,004:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 15:26:29,005:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 15:26:29,006:__main__:manager:function manager end
INFO:2020-02-05 15:26:29,006:__main__:manager:function manager start
DEBUG:2020-02-05 15:26:29,006:__main__:get_compass:function get_compass start
INFO:2020-02-05 15:26:29,006:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 15:26:29,019:__main__:get_img:function get_img start
INFO:2020-02-05 15:26:29,019:__main__:get_img:Captured image
DEBUG:2020-02-05 15:26:31,032:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 15:26:33,025:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 15:26:33,028:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 15:26:33,029:__main__:manager:function manager end
INFO:2020-02-05 15:26:33,030:__main__:manager:function manager start
DEBUG:2020-02-05 15:26:33,030:__main__:get_compass:function get_compass start
INFO:2020-02-05 15:26:33,031:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 15:26:33,049:__main__:get_img:function get_img start
INFO:2020-02-05 15:26:33,049:__main__:get_img:Captured image
DEBUG:2020-02-05 15:26:35,318:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 15:26:35,319:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 15:26:35,320:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 15:26:35,320:__main__:manager:function manager end
INFO:2020-02-05 15:26:35,321:__main__:manager:function manager start
DEBUG:2020-02-05 15:26:35,321:__main__:get_compass:function get_compass start
INFO:2020-02-05 15:26:35,321:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 15:26:35,333:__main__:get_img:function get_img start
INFO:2020-02-05 15:26:35,334:__main__:get_img:Captured image
DEBUG:2020-02-05 15:26:41,093:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 15:26:41,094:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 15:26:41,096:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 15:26:41,097:__main__:manager:function manager end
INFO:2020-02-05 15:26:41,098:__main__:manager:function manager start
DEBUG:2020-02-05 15:26:41,098:__main__:get_compass:function get_compass start
INFO:2020-02-05 15:26:41,099:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 15:26:41,400:__main__:get_img:function get_img start
INFO:2020-02-05 15:26:41,400:__main__:get_img:Captured image
DEBUG:2020-02-05 15:26:45,099:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 15:26:45,100:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 15:26:47,948:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 15:26:48,037:__main__:manager:function manager end
INFO:2020-02-05 15:26:48,038:__main__:manager:function manager start
DEBUG:2020-02-05 15:26:48,039:__main__:get_compass:function get_compass start
INFO:2020-02-05 15:26:48,039:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 15:26:48,057:__main__:get_img:function get_img start
INFO:2020-02-05 15:26:48,058:__main__:get_img:Captured image
DEBUG:2020-02-05 15:26:50,313:__main__:save_to_db:function save_to_db start
DEBUG:2020-02-05 15:26:50,313:__main__:save_to_db:Saving to db
DEBUG:2020-02-05 15:26:50,314:__main__:save_to_db:function save_to_db end
DEBUG:2020-02-05 15:26:50,316:__main__:manager:function manager end
INFO:2020-02-05 15:26:50,317:__main__:manager:function manager start
DEBUG:2020-02-05 15:26:50,317:__main__:get_compass:function get_compass start
INFO:2020-02-05 15:26:50,317:__main__:get_compass:Returned compass info
DEBUG:2020-02-05 15:26:50,329:__main__:get_img:function get_img start
INFO:2020-02-05 15:26:50,329:__main__:get_img:Captured image

OSError: Cannot detect RPi-Sense FB device

Terminal Error

Traceback (most recent call last):
  File "main.py", line 153, in <module>
    main().manager()
  File "main.py", line 59, in __init__
    self.sense = SenseHat()
  File "/usr/lib/python3/dist-packages/sense_hat/sense_hat.py", line 39, in __init__
    raise OSError('Cannot detect %s device' % self.SENSE_HAT_FB_NAME)
OSError: Cannot detect RPi-Sense FB device

This is happening because it is not having plugged in the Sens Hat to the RPI1.

Program do not stop after time

Stope time set
https://github.com/MatsAndT/Astro-pi-kvadda/blob/74ccccbe0cf61d7fcdcc0f73db52eb6fb74d1f5b/main.py#L75

Where the test is done
https://github.com/MatsAndT/Astro-pi-kvadda/blob/74ccccbe0cf61d7fcdcc0f73db52eb6fb74d1f5b/main.py#L144
(May need to change the way this test is done.)

The program is to be stoped automated after two h, and 58 m and then the close DB is to be run. You can change the stop time so you do not need to wait for the time, change it to for example 3 min.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.