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

Error with codecs? #26

Open
vrooms-leucine0i opened this issue May 13, 2024 · 7 comments
Open

Error with codecs? #26

vrooms-leucine0i opened this issue May 13, 2024 · 7 comments

Comments

@vrooms-leucine0i
Copy link

Hello I am sorry but I am dumb when it comes to computer codes. I tried running this and got this error:

Traceback (most recent call last):
  File "C:\Users\K\Downloads\letterboxd-06_force_damage-2024-05-13-02-54-utc\py-trakt-letterboxd-import-python3.py", line 209, in <module>
    data = get_data_letterboxd(letterboxd_file[0],use_diary_file)
  File "C:\Users\K\Downloads\letterboxd-06_force_damage-2024-05-13-02-54-utc\py-trakt-letterboxd-import-python3.py", line 123, in get_data_letterboxd
    print([row[1],row[2],row[7]+' 20:15',imdbid,row[4]])
  File "C:\Users\K\AppData\Local\Programs\Python\Python310\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2153' in position 14: character maps to <undefined>

Not sure what this means or why it stopped

@jensb89
Copy link
Owner

jensb89 commented May 14, 2024

Can you please try the changes from here and see if it works with that?
https://github.com/jensb89/trakt---letterboxd-import/pull/25/files

@vrooms-leucine0i
Copy link
Author

Same error. It starts to run and then stops again

@jensb89
Copy link
Owner

jensb89 commented May 15, 2024

Ok, it's one title in your csv file with a strange encoding probably.

Do you know at which point it stops? Can you post that line here, or upload the file? Then I can have a look later

@jensb89
Copy link
Owner

jensb89 commented May 15, 2024

Quick workaround would also be to just delete that one line from the csv.

@vrooms-leucine0i
Copy link
Author

Think I found the issue - it was with Naked Gun 33 1/3 - it didn't like the 1/3 unicode.

@vrooms-leucine0i
Copy link
Author

No issue when trying watched.csv, but when I tried the diary, it didn't import everything even though it listed all the entries. This time I get error:

Traceback (most recent call last):
  File "C:\Users\K\Downloads\letterboxd-06_force_damage-2024-05-13-02-54-utc\py-trakt-letterboxd-import-python3.py", line 235, in <module>
    send_data(movie_data,token,use_diary_file)
  File "C:\Users\K\Downloads\letterboxd-06_force_damage-2024-05-13-02-54-utc\py-trakt-letterboxd-import-python3.py", line 147, in send_data
    f = urllib2.urlopen(req)
  File "C:\Users\K\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Users\K\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 525, in open
    response = meth(req, response)
  File "C:\Users\K\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 634, in http_response
    response = self.parent.error(
  File "C:\Users\K\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 563, in error
    return self._call_chain(*args)
  File "C:\Users\K\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
  File "C:\Users\K\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 429: Too Many Requests

@vrooms-leucine0i
Copy link
Author

vrooms-leucine0i commented May 15, 2024

The above error was when trying the new changes from this comment

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

2 participants