arabovs / cardcollector

0 stars 0 forks source link

be/mtg find a way to better handle stupid strings in float attack and defense #36

Open arabovs opened 1 year ago

arabovs commented 1 year ago

Traceback (most recent call last): File "c:\Users\arabo\Coding\lotr-tcg-scrapper\apps\be\src\MtgTCG.py", line 160, in getScryfallApiBulkOracle(URL_API_BULK) File "c:\Users\arabo\Coding\lotr-tcg-scrapper\apps\be\src\MtgTCG.py", line 126, in getScryfallApiBulkOracle retryConnection(bulk_api_uri) File "c:\Users\arabo\Coding\lotr-tcg-scrapper\apps\be\src\MtgTCG.py", line 156, in retryConnection insertMtgToGQL(cards) File "c:\Users\arabo\Coding\lotr-tcg-scrapper\apps\be\src\MtgTCG.py", line 111, in insertMtgToGQL gql_connector.gqlInsertCards(list(bulk.values())) File "c:\Users\arabo\Coding\lotr-tcg-scrapper\apps\be\src\etc\postgre\GQL.py", line 125, in gqlInsertCards result = client.execute(query, variable_values=variables) File "C:\Users\arabo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\gql\client.py", line 403, in execute return self.execute_sync( File "C:\Users\arabo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\gql\client.py", line 221, in execute_sync return session.execute( File "C:\Users\arabo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\gql\client.py", line 860, in execute raise TransportQueryError( gql.transport.exceptions.TransportQueryError: {'extensions': {'code': 'parse-failed', 'path': '$.selectionSet.insert_card_details.args.objects[472].cost'}, 'message': 'The value 0.5 lies outside the bounds or is not an integer. Maybe it is a float, or is there integer overflow?'}

arabovs commented 1 year ago

@mitky working on https://github.com/arabovs/lotr-tcg-scrapper/tree/be/MTG/hanndle-attack