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

Add Boto3 support? #26

Open
Dragonkid1996 opened this issue Nov 21, 2023 · 2 comments
Open

Add Boto3 support? #26

Dragonkid1996 opened this issue Nov 21, 2023 · 2 comments

Comments

@Dragonkid1996
Copy link

I have created a game which uses Boto3 to retrieve, display and update a high scores table in AWS DynamoDB. However, the module cannot be found when I try to package using Pygbag. Is this something that could be added?

@pmp-p
Copy link
Member

pmp-p commented Nov 21, 2023

maybe try unpacking https://files.pythonhosted.org/packages/18/c6/1c9c86e51f42e3a601aab9c6d37c9b3c1aa859deb21be7e29938f008b499/boto3-1.29.4-py3-none-any.whl next to your main.py and try to import manually from repl http://localhost:8000/?-i it may be pure python if it does not work then it probably need async stuff that someone will have to implement.

@Dragonkid1996
Copy link
Author

Dragonkid1996 commented Nov 29, 2023

Hey, an update:

I have unpacked the boto3 wheel and added all the requisite wheels, and am now at the point where the game runs until I want to retrieve the high scores from the DynamoDB, at which point I get the following from the stacktrace:

resume=<function <module> at 0x160ef60> is not awaitable
>>> Task exception was never retrieved
future: <Task finished name='main' coro=<main() done, defined at <console>:293> exception=HTTPClientError('An HTTP Client raised an unhandled exception: unknown encoding: idna')>
Traceback (most recent call last):
  File "/data/data/pythonproject/assets/botocore/httpsession.py", line 464, in send
    urllib_response = conn.urlopen(
                      ^^^^^^^^^^^^^
  File "/data/data/pythonproject/assets/urllib3/connectionpool.py", line 790, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/data/data/pythonproject/assets/urllib3/connectionpool.py", line 467, in _make_request
    self._validate_conn(conn)
  File "/data/data/pythonproject/assets/urllib3/connectionpool.py", line 1096, in _validate_conn
    conn.connect()
  File "/data/data/pythonproject/assets/urllib3/connection.py", line 611, in connect
    self.sock = sock = self._new_conn()
                       ^^^^^^^^^^^^^^^^
  File "/data/data/pythonproject/assets/urllib3/connection.py", line 203, in _new_conn
    sock = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/pythonproject/assets/urllib3/util/connection.py", line 56, in create_connection
    host.encode("idna")
LookupError: unknown encoding: idna

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