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

Removes trailing 0x85 character in explosives.json #37243

Merged
merged 2 commits into from
Jan 20, 2020

Conversation

BrettDong
Copy link
Member

Summary

SUMMARY: None

Purpose of change

There is an invisible 0x85 character at the end of line 644 in data/json/items/tool/explosives.json and it stops lang/extract_json_strings.py from parsing that JSON file.

Loading data/json/items/tool/explosives.json
Traceback (most recent call last):
  File "lang/extract_json_strings.py", line 1183, in <module>
    extract_all_from_dir(i)
  File "lang/extract_json_strings.py", line 1137, in extract_all_from_dir
    extract_all_from_dir(os.path.join(json_dir, d))
  File "lang/extract_json_strings.py", line 1137, in extract_all_from_dir
    extract_all_from_dir(os.path.join(json_dir, d))
  File "lang/extract_json_strings.py", line 1129, in extract_all_from_dir
    extract_all_from_file(full_name)
  File "lang/extract_json_strings.py", line 1145, in extract_all_from_file
    jsondata = json.load(fp)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x85 in position 21722: invalid start byte
Error in extract_json_strings.py. Aborting

Describe the solution

Replaced that character with ...

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [JSON] Changes (can be) made in JSON Translation I18n labels Jan 20, 2020
@ZhilkinSerg ZhilkinSerg merged commit cd23350 into CleverRaven:master Jan 20, 2020
@BrettDong BrettDong deleted the trailing branch January 20, 2020 08:11
@Fris0uman
Copy link
Contributor

I think some PR went and replace all ... with in the past as it was supposed to be better for translation. Maybe we need a decision on which to use and put it somewhere in the doc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [JSON] Changes (can be) made in JSON Translation I18n
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants