Feb-04-2020, 09:28 PM
Hopefully you guys can see this image. Apoligies about the massive watermark...I need an new cloud I think...
Anyways sorry Michael.
I was very hopeful that this was going to work.
Object oriented programming, sounds good, though perhaps a bit complicated for a big n00been00b like me but I thought well I'll just have to roll with it.
Unfortunately my first experience hasn't been great :(
Now what I did was to rename Database.txt to Database1.txt
Then I copied that file as Database2.txt
When I run the script, as you see, its giving: -
And I definitely don't have the skills to troubleshoot this. Though I did try to replace Database1.txt with the full path name instead. Same error
I discovered debuggers in my attempt to solve this... when I run the debugger in Thorny, it seems to me that the class exists.
When the debugger gets to that line it shows
Anyways sorry Michael.
I was very hopeful that this was going to work.
Object oriented programming, sounds good, though perhaps a bit complicated for a big n00been00b like me but I thought well I'll just have to roll with it.
Unfortunately my first experience hasn't been great :(
Now what I did was to rename Database.txt to Database1.txt
Then I copied that file as Database2.txt
When I run the script, as you see, its giving: -
Quote:
Traceback (most recent call last):
File "/home/pi/Desktop/Pyread.py", line 47, in <module>
dat1 = Data_file("Database1.txt")
NameError: name 'Data_file' is not defined
And I definitely don't have the skills to troubleshoot this. Though I did try to replace Database1.txt with the full path name instead. Same error
I discovered debuggers in my attempt to solve this... when I run the debugger in Thorny, it seems to me that the class exists.
When the debugger gets to that line it shows
Quote:Name_________________Value
Data_File _____________<class'__main__.Data_File'>
![[Image: rpi.jpg]](https://i1235.photobucket.com/albums/ff436/Asiyreh/rpi.jpg)