I am trying to use one module to read data from a sensor board, put that data into a class, than print that data in another module. I'm not sure if I am following best practices here or if there is a better way to do this. Currently I am getting the following error and I'm not sure how to correct.
Traceback (most recent call last):
  File "app/conductor.py", line 15, in <module>
    accel_x, accel_y, accel_z = nineDOF.Acceleration()
TypeError: cannot unpack non-iterable NoneType object
conductor.py:
import time
import datetime
import dht11
import max31865
import lsm9ds1
while True:
    externalReading = max31865.temp()
    print("External Temp: {0:0.3f}C".format(externalReading))
    internalTemp, internalHumidity = dht11.readings()
    print("Internal Temp 1: {:.3f}C  Humidity: {}% ".format(internalTemp, internalHumidity))
    nineDOF = lsm9ds1.get()
    accel_x, accel_y, accel_z = nineDOF.Acceleration()
    mag_x, mag_y, mag_z = nineDOF.Magnetometer()
    gyro_x, gyro_y, gyro_z = nineDOF.Gyroscope()
    internalTemp2 = nineDOF.temperature()
    print(
        "Acceleration (m/s^2): ({0:0.3f},{1:0.3f},{2:0.3f})".format(
            accel_x, accel_y, accel_z
        )
    )
    print(
        "Magnetometer (gauss): ({0:0.3f},{1:0.3f},{2:0.3f})".format(mag_x, mag_y, mag_z)
    )
    print(
        "Gyroscope (degrees/sec): ({0:0.3f},{1:0.3f},{2:0.3f})".format(
            gyro_x, gyro_y, gyro_z
        )
    )
    print("Internal Temp 2: {0:0.3f}C".format(internalTemp2))
lsm9ds1.py:
import board
import busio
import adafruit_lsm9ds1
# SPI connection:
from digitalio import DigitalInOut, Direction
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
csag = DigitalInOut(board.D5)
csag.direction = Direction.OUTPUT
csag.value = True
csm = DigitalInOut(board.D6)
csm.direction = Direction.OUTPUT
csm.value = True
sensor = adafruit_lsm9ds1.LSM9DS1_SPI(spi, csag, csm)
class Readings:
    def __init__(self):
        pass
    def Acceleration(self):
        x, y, z = sensor.acceleration
    def Magnetometer(self):
        x, y, z = sensor.magnetic
    def Gyroscope(self):
        x, y, z = sensor.gyro
    def temperature(self):
        x = sensor.temperature
def get():
    return Readings()
 
     
    