sanskrit-lexicon / csl-corrections

Replacement for sanskrit-lexicon/CORRECTIONS. User corrections to sanskrit-lexicon/csl-orig
GNU General Public License v3.0
0 stars 0 forks source link

403 error with post_github_issues.sh #55

Closed funderburkjim closed 3 years ago

funderburkjim commented 3 years ago

This error is a new one.

It seems that there might be some kind of Github 'quota' (at about 20) for uploading issues.

When I waited for a minute or two, and reran the script, another batch was accepted.

Had to do this three times, and there were 45 issues uploaded.

funderburkjim commented 3 years ago

The program upload_github_issue.py caught the 403 error. Within it the error-trapping code, there was a 'print('line = ',line)' statement which generated a Python error:

  File "C:\Users\jimfu\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 30-37: character maps to <undefined>

The line in question had some Extended Ascii or Devanagari Unicode characters.

Changed the print to print('entry title=',entry['title']), which normally has only ascii characters.