Skip to content

’ character in event field causes script crash #13

Description

@Rowbotronics

Log output:

The following exception was thrown:

'latin-1' codec can't encode character '\u2019' in position 11: ordinal not in range(256)

File "/usr/lib/python3/dist-packages/apscheduler/executors/base.py", line 125, in run_job
retval = job.func(*job.args, **job.kwargs)
File "/home/pi/code/automation-scripts/RegistrationMonitor.py", line 324, in Run
self.SendEventReminders(upcoming_events)
File "/home/pi/code/automation-scripts/RegistrationMonitor.py", line 278, in SendEventReminders
action="Send event reminder email")
File "/home/pi/code/automation-scripts/database/init.py", line 195, in AddLogEntry
self.NewCursor().execute(sql,(timestamp, event_name, registrant_name, registrant_email, action))
File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 207, in execute
args = tuple(map(db.literal, args))
File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 304, in literal
s = self.escape(o, self.encoders)
File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 226, in unicode_literal
return db.literal(str(u).encode(unicode_literal.charset))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions