Need help with putting the AS7265X spectrometer onto the raspberry pi 5

I am trying to put a spectrometer onto the Raspberry pi 5, such that it can read the 18 channels of the AS7265X and create a graph with them. I also want the readings to save in a .csv file after each reading. The idea is that I can use the spectrometer to record changes in readings of, for example, a banana rotting over time. The problem that I have encountered is that there is no, or very little documentation as to how I approach this in this case scenario.

I have tried to find sources that were created from other users ( GitHub - LiamsGitHub/AS7265x-spectrometer: Python module to drive the SparkFun Triad Spectroscopy Sensor ) and jdesbonnet’s github design, but so far they have not worked for me, I keep either getting a syntax error and/or it does not read. I am sure I am probably doing something wrong, but I really don’t know what after hours of analysis.

examplecode.txt (7.9 KB)

^linked above^ is a txt file of the python code I used (python cannot be uploaded to the forum)

When I used this code I got the readings I wanted but some channels did not initialize (730,760,810,860,900 just showed up as 0.00 nm), which was odd. I suspect that it is an issue in the calling of these channels from the AS7265X_sparkfun libary, but not sure how to fix.

I am a newbie to coding my own software, so if there is anybody that can help me in this, It would be much appreciated!!