Traceback (most recent call last):
File "C:\Projects\workspaces\dbopendata\db-api-to-gtfs4\db_to_gtfs.py", line 492, in <module>
main(options=arguments)
File "C:\Projects\workspaces\dbopendata\db-api-to-gtfs4\db_to_gtfs.py", line 472, in main
converter.get_all_trips_for_stop(converter.stops[sid])
File "C:\Projects\workspaces\dbopendata\db-api-to-gtfs4\db_to_gtfs.py", line 83, in get_all_trips_for_stop
print '@ #%d (%s) on %s %s, unique trips collected: %d, unprocessed stations left: %d' % (stop['stop_id'], stop['stop_name'], stop['last_date'].strftime('%Y-%m-%d'), str(stop['last_check_h']) + ':' + str(stop['last_check_m']), len(self.trips), self.unproced_counter)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 21: ordinal not in range(128)
Fixed via stop['stop_name'].encode('utf-8').strip().
I was getting the following error:
Fixed via
stop['stop_name'].encode('utf-8').strip()
.