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

Harrowing error #19

Open
Snakhe opened this issue Feb 6, 2023 · 5 comments
Open

Harrowing error #19

Snakhe opened this issue Feb 6, 2023 · 5 comments

Comments

@Snakhe
Copy link

Snakhe commented Feb 6, 2023

The bot always tries to play The Harrowing on mana 6, even though it's not possible to do so (It costs 10 mana since patch 3.16). It then abruptly ends the turn without doing anything, wasting all its mana and eventually losing the game.

@MOj0
Copy link
Owner

MOj0 commented Feb 6, 2023

Ah yes, sorry about that. The issue is that the card sets are outdated, so if you simply delete the card_sets folder and run it again, it should download all the new card sets, and it should work.
I should probably automaize that somehow, but that would require downloading the card sets on every run... so I'm not exactly sure how to go about this.

@Snakhe
Copy link
Author

Snakhe commented Feb 7, 2023

I figured the problem was something like that... Though I also made my own ephemeral deck without Harrowing and it's been working great! more that 60% win rate in normals (most if not all of those are against other bots but whatever).

Thanks for the quick reply and for the bot, it's made the grind a lot more bearable.

@Snakhe
Copy link
Author

Snakhe commented Feb 7, 2023

I have a follow up problem :/
I tried your workaround but downloading card sets doesn't seem to work. This is the powershell output:

PS D:\LoR-Bot-master> python LOR_Bot.py
Traceback (most recent call last):
File "C:\Users\Yilan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\response.py", line 444, in _error_catcher
yield
File "C:\Users\Yilan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\response.py", line 567, in read
data = self._fp_read(amt) if not fp_closed else b""
^^^^^^^^^^^^^^^^^^
File "C:\Users\Yilan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\response.py", line 533, in _fp_read
return self._fp.read(amt) if amt is not None else self._fp.read()
^^^^^^^^^^^^^^^^^^
File "C:\Users\Yilan\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 465, in read
s = self.fp.read(amt)
^^^^^^^^^^^^^^^^^
File "C:\Users\Yilan\AppData\Local\Programs\Python\Python311\Lib\socket.py", line 705, in readinto
return self._sock.recv_into(b)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Yilan\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 1278, in recv_into
return self.read(nbytes, buffer)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Yilan\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 1134, in read
return self._sslobj.read(len, buffer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2546)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\LoR-Bot-master\LOR_Bot.py", line 25, in
download_missing_card_sets()
File "D:\LoR-Bot-master\download_card_sets.py", line 34, in download_missing_card_sets
while download_card_set(n_sets + counter):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\LoR-Bot-master\download_card_sets.py", line 44, in download_card_set
z = zipfile.ZipFile(io.BytesIO(r.content))
^^^^^^^^^
File "C:\Users\Yilan\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 838, in content
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Yilan\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 760, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "C:\Users\Yilan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\response.py", line 628, in stream
data = self.read(amt=amt, decode_content=decode_content)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Yilan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\response.py", line 566, in read
with self._error_catcher():
File "C:\Users\Yilan\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 155, in exit
self.gen.throw(typ, value, traceback)
File "C:\Users\Yilan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\response.py", line 455, in _error_catcher
raise SSLError(e)
urllib3.exceptions.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2546)

Edit: I know I can download them manually, which I'm doing now.

@MOj0
Copy link
Owner

MOj0 commented Feb 7, 2023

Hmm, I haven't seen that error yet. Do you have the correct dependencies installed? I would suggest running pip install -r requirements.txt

Anyways I deleted the card sets and ran the program, and it worked just fine.
I commited the changes (and also set that it downloads the lite zip file, so download time is shorter). If you're having trouble you can simply pull the latest changes from master and it should work.

@Snakhe
Copy link
Author

Snakhe commented Feb 7, 2023

Yes I have all the dependencies.

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