algokittens / algoNFTs

40 stars 17 forks source link

python config_mint.py command returns HTTP error 400 #17

Closed claudebaxter closed 2 years ago

claudebaxter commented 2 years ago

Edit: resolved issue with a little bit more troubleshooting. The unit name was too long by one digit, it cannot exceed 8 digits. Had to slightly modify the unit name for #s 1000+ in the series. In hindsight, would have accounted for this at the beginning so there isn't a change in unit names.

Running into an issue, I had a few problems with timeouts but was able to reset the loop to pick up where it left off, but once I got to #999 in a series of 2000 and it throws the error 400 below. Connection and wallet balance are good, was just curious if there is any fix? (xxx's are to replace my info).

Before I paste in the error, my config_mint.py line 29 looks like this:

for n in range(999, len(df)): mint_asset (n)

This is the error when I run "python config_mint.py" in anaconda:

(base) C:\Users\XXXX\Desktop\algoNFTs>cd batch_mint_arc69

(base) C:\Users\XXXX\Desktop\algoNFTs\batch_mint_arc69>python config_mint.py {'IpfsHash': 'XXXXX', 'PinSize': 64541, 'Timestamp': '2022-07-17T15:04:07.804Z', 'isDuplicate': True} Account 1 address: AL6XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Traceback (most recent call last): File "C:\Users\XXXX\anaconda3\lib\site-packages\algosdk\v2client\algod.py", line 78, in algod_request resp = urlopen(req) File "C:\Users\XXXX\anaconda3\lib\urllib\request.py", line 214, in urlopen return opener.open(url, data, timeout) File "C:\Users\XXXX\anaconda3\lib\urllib\request.py", line 523, in open response = meth(req, response) File "C:\Users\XXXX\anaconda3\lib\urllib\request.py", line 632, in http_response response = self.parent.error( File "C:\Users\XXXX\anaconda3\lib\urllib\request.py", line 561, in error return self._call_chain(args) File "C:\Users\XXXX\anaconda3\lib\urllib\request.py", line 494, in _call_chain result = func(args) File "C:\Users\XXXX\anaconda3\lib\urllib\request.py", line 641, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 400: Bad Request

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\XXXX\Desktop\algoNFTs\batch_mint_arc69\config_mint.py", line 30, in mint_asset (n) File "C:\Users\XXXX\Desktop\algoNFTs\batch_mint_arc69\mint_arc69.py", line 98, in mint_asset sign_and_send_txn(algod_client, txn) File "C:\Users\XXXX\Desktop\algoNFTs\batch_mint_arc69\mint_arc69.py", line 106, in sign_and_send_txn txid = algod_client.send_transaction(stxn) File "C:\Users\XXXX\anaconda3\lib\site-packages\algosdk\v2client\algod.py", line 237, in send_transaction return self.send_raw_transaction( File "C:\Users\XXXX\anaconda3\lib\site-packages\algosdk\v2client\algod.py", line 260, in send_raw_transaction return self.algod_request("POST", req, data=txn, **kwargs)["txId"] File "C:\Users\XXXX\anaconda3\lib\site-packages\algosdk\v2client\algod.py", line 85, in algod_request raise error.AlgodHTTPError(e, code) algosdk.error.AlgodHTTPError: transaction {_struct:{} Sig:[XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX] Msig:{_struct:{} Version:0 Threshold:0 Subsigs:[]} Lsig:{_struct:{} Logic:[] Sig:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 URL:ipfs://XXXXXXXXXXXXXXXXXXXXXXXXXXMetadataHash:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] Manager:AL6XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Reserve:AL6XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Freeze:

(base) C:\Users\XXXX\Desktop\algoNFTs\batch_mint_arc69>

claudebaxter commented 2 years ago

Resolved issue with a little bit more troubleshooting. The unit name was too long by one digit, it cannot exceed 8 digits. Had to slightly modify the unit name for #s 1000+ in the series. In hindsight, would have accounted for this at the beginning so there isn't a change in unit names.