Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

’ character in event field causes script crash #13

Open
Rowbotronics opened this issue Jan 26, 2019 · 0 comments
Open

’ character in event field causes script crash #13

Rowbotronics opened this issue Jan 26, 2019 · 0 comments

Comments

@Rowbotronics
Copy link
Contributor

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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant