Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix UnicodeDecodeError when postgres is not configured in english #4253

Merged
merged 3 commits into from
Dec 4, 2018

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Dec 3, 2018

This is actually a bit of a half-assed effort at fixing #4252. Having spent far too long staring at this and wondering what to do, I'm forced to the conclusion that the right answer is just to drop support for python 2, which appears to be completely broken when it comes to unicode in exception descriptions.

In the meantime, I hope this will make things slightly better.

This is a bit of a half-assed effort at fixing
#4252. Fundamentally the right
answer is to drop support for Python 2.
@richvdh richvdh force-pushed the rav/fix_postgres_unicode_issue branch from 8fe7c7a to 4ddcd4d Compare December 3, 2018 23:31
@codecov-io
Copy link

codecov-io commented Dec 3, 2018

Codecov Report

Merging #4253 into develop will decrease coverage by <.01%.
The diff coverage is 53.84%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4253      +/-   ##
===========================================
- Coverage    73.55%   73.55%   -0.01%     
===========================================
  Files          299      299              
  Lines        29806    29820      +14     
  Branches      4872     4876       +4     
===========================================
+ Hits         21923    21933      +10     
  Misses        6456     6456              
- Partials      1427     1431       +4
Impacted Files Coverage Δ
synapse/util/stringutils.py 68.08% <53.84%> (-6.21%) ⬇️
synapse/util/metrics.py 81.69% <0%> (-4.23%) ⬇️
synapse/handlers/search.py 81.25% <0%> (ø) ⬆️
synapse/handlers/federation.py 61.72% <0%> (ø) ⬆️
synapse/appservice/scheduler.py 86.71% <0%> (+0.21%) ⬆️
synapse/handlers/device.py 81.45% <0%> (+0.8%) ⬆️
synapse/util/logcontext.py 89.03% <0%> (+1.31%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c033242...ee7ce0a. Read the comment docs.

@richvdh richvdh requested a review from a team December 4, 2018 09:57
elif len(e.args) > 1:
return six.text_type(repr(e.args))

msg = e.args
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean msg = e.args[0]?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sigh. yes. thank you.

@richvdh richvdh merged commit ecc2318 into develop Dec 4, 2018
@richvdh richvdh deleted the rav/fix_postgres_unicode_issue branch December 4, 2018 10:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants