Maybe a connexion close is missing, or 'null' amount problem? #18

Closed
opened 2022-10-06 16:27:07 +02:00 by qo-op · 4 comments
Member

During "balance" request on wallets, GVA connexion is showing this error.

Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.10/site-packages/gql/transport/aiohttp.py", line 200, in execute
    result = await resp.json()
  File "/home/pi/.local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1103, in json
    raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8', url=URL('https://g1.librelois.fr/gva')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.10/site-packages/gql/transport/aiohttp.py", line 211, in execute
    resp.raise_for_status()
  File "/home/pi/.local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://g1.librelois.fr/gva')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/pi/.zen/Astroport.ONE/tools/jaklis/lib/gvaBalance.py", line 42, in sendDoc
    balanceResult = self.client.execute(queryBuild, variable_values=paramsBuild)
  File "/home/pi/.local/lib/python3.10/site-packages/gql/client.py", line 167, in execute
    data: Dict[Any, Any] = loop.run_until_complete(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/home/pi/.local/lib/python3.10/site-packages/gql/client.py", line 126, in execute_async
    async with self as session:
  File "/home/pi/.local/lib/python3.10/site-packages/gql/client.py", line 250, in __aenter__
    await self.session.fetch_schema()
  File "/home/pi/.local/lib/python3.10/site-packages/gql/client.py", line 427, in fetch_schema
    execution_result = await self.transport.execute(
  File "/home/pi/.local/lib/python3.10/site-packages/gql/transport/aiohttp.py", line 214, in execute
    raise TransportServerError(str(e)) from e
gql.transport.exceptions.TransportServerError: 400, message='Bad Request', url=URL('https://g1.librelois.fr/gva')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/.zen/Astroport.ONE/ASTROBOT/../tools/jaklis/jaklis.py", line 252, in <module>
    gva.balance(args.mempool)
  File "/home/pi/.zen/Astroport.ONE/tools/jaklis/lib/gva.py", line 60, in balance
    balanceValue = gva.sendDoc()
  File "/home/pi/.zen/Astroport.ONE/tools/jaklis/lib/gvaBalance.py", line 44, in sendDoc
    message = ast.literal_eval(str(e))["message"]
  File "/usr/lib/python3.10/ast.py", line 62, in literal_eval
    node_or_string = parse(node_or_string.lstrip(" \t"), mode='eval')
  File "/usr/lib/python3.10/ast.py", line 50, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 1
    400, message='Bad Request', url=URL('https://g1.librelois.fr/gva')
                ^
SyntaxError: invalid syntax
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f8fe04dc6d0>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f8fe04ef820>, 435949.656394928)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f8fe04dc790>
MONTANT (G1) 
During "balance" request on wallets, GVA connexion is showing this error. ``` Traceback (most recent call last): File "/home/pi/.local/lib/python3.10/site-packages/gql/transport/aiohttp.py", line 200, in execute result = await resp.json() File "/home/pi/.local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1103, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8', url=URL('https://g1.librelois.fr/gva') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pi/.local/lib/python3.10/site-packages/gql/transport/aiohttp.py", line 211, in execute resp.raise_for_status() File "/home/pi/.local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://g1.librelois.fr/gva') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/pi/.zen/Astroport.ONE/tools/jaklis/lib/gvaBalance.py", line 42, in sendDoc balanceResult = self.client.execute(queryBuild, variable_values=paramsBuild) File "/home/pi/.local/lib/python3.10/site-packages/gql/client.py", line 167, in execute data: Dict[Any, Any] = loop.run_until_complete( File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete return future.result() File "/home/pi/.local/lib/python3.10/site-packages/gql/client.py", line 126, in execute_async async with self as session: File "/home/pi/.local/lib/python3.10/site-packages/gql/client.py", line 250, in __aenter__ await self.session.fetch_schema() File "/home/pi/.local/lib/python3.10/site-packages/gql/client.py", line 427, in fetch_schema execution_result = await self.transport.execute( File "/home/pi/.local/lib/python3.10/site-packages/gql/transport/aiohttp.py", line 214, in execute raise TransportServerError(str(e)) from e gql.transport.exceptions.TransportServerError: 400, message='Bad Request', url=URL('https://g1.librelois.fr/gva') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pi/.zen/Astroport.ONE/ASTROBOT/../tools/jaklis/jaklis.py", line 252, in <module> gva.balance(args.mempool) File "/home/pi/.zen/Astroport.ONE/tools/jaklis/lib/gva.py", line 60, in balance balanceValue = gva.sendDoc() File "/home/pi/.zen/Astroport.ONE/tools/jaklis/lib/gvaBalance.py", line 44, in sendDoc message = ast.literal_eval(str(e))["message"] File "/usr/lib/python3.10/ast.py", line 62, in literal_eval node_or_string = parse(node_or_string.lstrip(" \t"), mode='eval') File "/usr/lib/python3.10/ast.py", line 50, in parse return compile(source, filename, mode, flags, File "<unknown>", line 1 400, message='Bad Request', url=URL('https://g1.librelois.fr/gva') ^ SyntaxError: invalid syntax Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7f8fe04dc6d0> Unclosed connector connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f8fe04ef820>, 435949.656394928)]'] connector: <aiohttp.connector.TCPConnector object at 0x7f8fe04dc790> MONTANT (G1) ```
Owner

Tu es en python 3.10, tu as essayé en 3.9 ?

Tu es en python 3.10, tu as essayé en 3.9 ?
Owner

Moi aussi j'ai une erreur en 3.9, mais pas la même que toi, je comprends pas:

$ jaklis balance -p 9jQL9ViWRJPj7HfbJjfLDtWxUNyCzAaRN3cbbKyr3oqi
Traceback (most recent call last):
  File "/home/poka/dev/jaklis/jaklis.py", line 247, in <module>
    from lib.gva import GvaApi
  File "/home/poka/dev/jaklis/lib/gva.py", line 1, in <module>
    from lib.currentUd import currentUd
  File "/home/poka/dev/jaklis/lib/currentUd.py", line 7, in <module>
    from gql.transport.aiohttp import AIOHTTPTransport
  File "/home/poka/.local/lib/python3.9/site-packages/gql/transport/aiohttp.py", line 6, in <module>
    import aiohttp
  File "/home/poka/.local/lib/python3.9/site-packages/aiohttp/__init__.py", line 6, in <module>
    from .client import (
  File "/home/poka/.local/lib/python3.9/site-packages/aiohttp/client.py", line 35, in <module>
    from . import hdrs, http, payload
  File "/home/poka/.local/lib/python3.9/site-packages/aiohttp/http.py", line 7, in <module>
    from .http_parser import (
  File "/home/poka/.local/lib/python3.9/site-packages/aiohttp/http_parser.py", line 15, in <module>
    from .helpers import NO_EXTENSIONS, BaseTimerContext
  File "/home/poka/.local/lib/python3.9/site-packages/aiohttp/helpers.py", line 667, in <module>
    class CeilTimeout(async_timeout.timeout):
TypeError: function() argument 'code' must be code, not str
Moi aussi j'ai une erreur en 3.9, mais pas la même que toi, je comprends pas: ``` $ jaklis balance -p 9jQL9ViWRJPj7HfbJjfLDtWxUNyCzAaRN3cbbKyr3oqi Traceback (most recent call last): File "/home/poka/dev/jaklis/jaklis.py", line 247, in <module> from lib.gva import GvaApi File "/home/poka/dev/jaklis/lib/gva.py", line 1, in <module> from lib.currentUd import currentUd File "/home/poka/dev/jaklis/lib/currentUd.py", line 7, in <module> from gql.transport.aiohttp import AIOHTTPTransport File "/home/poka/.local/lib/python3.9/site-packages/gql/transport/aiohttp.py", line 6, in <module> import aiohttp File "/home/poka/.local/lib/python3.9/site-packages/aiohttp/__init__.py", line 6, in <module> from .client import ( File "/home/poka/.local/lib/python3.9/site-packages/aiohttp/client.py", line 35, in <module> from . import hdrs, http, payload File "/home/poka/.local/lib/python3.9/site-packages/aiohttp/http.py", line 7, in <module> from .http_parser import ( File "/home/poka/.local/lib/python3.9/site-packages/aiohttp/http_parser.py", line 15, in <module> from .helpers import NO_EXTENSIONS, BaseTimerContext File "/home/poka/.local/lib/python3.9/site-packages/aiohttp/helpers.py", line 667, in <module> class CeilTimeout(async_timeout.timeout): TypeError: function() argument 'code' must be code, not str ```
Owner

Ah c'est bon j'ai corrigé mon problème en lançant ./setup.sh

Puis j'ai du éditer dans le .env:

DUNITER="https://g1.librelois.fr"

$ ./jaklis.py balance -p Do99s6wQR2JLfhirPdpAERSjNbmjjECzGxHNJMiNKT3P
17238.27

Dit moi si ça marche chez toi

Ah c'est bon j'ai corrigé mon problème en lançant ./setup.sh Puis j'ai du éditer dans le .env: `DUNITER="https://g1.librelois.fr"` ``` $ ./jaklis.py balance -p Do99s6wQR2JLfhirPdpAERSjNbmjjECzGxHNJMiNKT3P 17238.27 ``` Dit moi si ça marche chez toi
Author
Member

ça va mieux on dirait, merci

ça va mieux on dirait, merci
poka closed this issue 2022-10-12 00:00:13 +02:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: axiom-team/jaklis#18
No description provided.