Skip to content

Breaks JSON package in Python 3.7 on Arch linux #11

@MichaelGoodale

Description

@MichaelGoodale

No idea why this is the case, but importing parselmouth has caused the JSON library to stop working, I assume due to some sort of reassignment of json.load or something similar.

Minimal case:

import json
import parselmouth
with open("main_survey", "r") as f:
      survey = json.load(f)

crashes, while if I run it without importing parselmouth it works fine.

output

Traceback (most recent call last):
  File "test.py", line 5, in <module>
    survey = json.load(f)
  File "/usr/lib/python3.7/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/usr/lib/python3.7/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4486: ordinal not in range(128)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions