LeagueOfPoro / CapsuleFarmerEvolved

Automatically drops from lolesports.com and farm Esports Capsules
Other
812 stars 128 forks source link

fix: Set log file encoding to utf8 #161

Closed LeagueOfPoro closed 1 year ago

LeagueOfPoro commented 1 year ago

Fixes #153

Summary of Changes

Fixes exception from PR #153

`Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "Browser.py", line 147, in sendWatchToLive
File "Browser.py", line 194, in __sendWatch
File "AssertCondition.py", line 11, in statusCodeMatches
Exceptions.StatusCodeAssertException.StatusCodeAssertException: Received unexpected status code. Wanted 201 but got 403
in https://rex.rewards.lolesports.com/v1/events/watch

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "logging_init_.py", line 1103, in emit
File "encodings\cp1251.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode character '\xe7' in position 79: character maps to
Call stack:
File "threading.py", line 973, in bootstrap
File "threading.py", line 1016, in bootstrap_inner
File "FarmThread.py", line 43, in run
File "Browser.py", line 149, in sendWatchToLive
File "logging_init.py", line 1506, in error
File "logging_init.py", line 1624, in log
File "logging_init.py", line 1634, in handle
File "logging_init_.py", line 1696, in callHandlers
File "logging_init_.py", line 968, in handle
File "logging\handlers.py", line 75, in emit
File "logging_init_.py", line 1218, in emit
File "logging_init_.py", line 1108, in emit
Message: 'Failed to send watch heartbeat for La Ligue Française'`

Additional context

Discord username (if different from GitHub): Poro

Testing instructions

How to download the PR for testing

Using GitHub CLI

  1. Clone this PR
  2. Run gh pr checkout 124 (Requires GitHub CLI)
  3. Follow the Advanced Installation Guides from the Wiki

Using regular GIT

  1. Fetch the PR git fetch origin pull/<PR_NUMBER>/head:<LOCAL_BRANCH_NAME> (e.g. git fetch origin pull/110/head:notif)
  2. Checkout the branch git checkout <LOCAL_BRANCH_NAME> (e.g. git checkout notif)
  3. Follow the Advanced Installation Guides from the Wiki