You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm attempting to use the CSV module with MicroPython, and am hitting a wall when trying to instantiate a DictReader.
The relevant code region follows..
def getServiceID():
# so, let's start by pulling the date and getting a dictionary of all of our trips.
theDate = strftime("%Y%m%d", t.localtime())
# grab our service id for the day
with open('sd/gtfslirr/calendar_dates.txt', newline='') as dateFile:
dateReader = csv.DictReader(dateFile)
for row in dateReader:
if row['date'] == theDate:
service_id = row['service_id']
return service_id
and the accompanying error...
Traceback (most recent call last):
File "boot.py", line 173, in <module>
File "boot.py", line 144, in main
File "boot.py", line 46, in getServiceID
File "csv.py", line 149, in __next__
File "csv.py", line 52, in __next__
AttributeError: 'match' object has no attribute 'groups'
Line 46, in this case, being dateReader = csv.DictReader(dateFile)
Thank you for maintaining the module, and please let me know if you have any insight into why I might be experiencing this.
The text was updated successfully, but these errors were encountered:
Hello, I'm attempting to use the CSV module with MicroPython, and am hitting a wall when trying to instantiate a DictReader.
The relevant code region follows..
and the accompanying error...
Line 46, in this case, being
dateReader = csv.DictReader(dateFile)
Thank you for maintaining the module, and please let me know if you have any insight into why I might be experiencing this.
The text was updated successfully, but these errors were encountered: