Flora-Network / flora-dev-cli

flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.
GNU General Public License v2.0
13 stars 22 forks source link

http error when trying to recover nft on some other forks. #10

Closed ligams closed 3 years ago

ligams commented 3 years ago

Tryed both python 3.7-3.8-3.9 debian 10, and from ubuntu 21, this is the returned error for some forks (works for flora & hddcoin), here is an example from greendoge :

    Coins eligible for recovery:
            hash:                     ***
            puzzle_hash:              33*************************************************************8
            amount:                   17500000000000
            timestamp:                1628989145
            --------
        # ... many recoverable coins
            --------
            hash:                     ***
            puzzle_hash:              33*************************************************************8
            amount:                   87500000000000
            timestamp:                1627693049
    An error occurred while sending the recovery transaction.
Traceback (most recent call last):
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/urllib3/connection.py", line 234, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/lib/python3.8/http/client.py", line 1252, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1298, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1247, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1046, in _send_output
    self.send(chunk)
  File "/usr/lib/python3.8/http/client.py", line 968, in send
    self.sock.sendall(data)
  File "/usr/lib/python3.8/ssl.py", line 1204, in sendall
    v = self.send(byte_view[count:])
  File "/usr/lib/python3.8/ssl.py", line 1173, in send
    return self._sslobj.write(data)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/urllib3/util/retry.py", line 532, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise
    raise value.with_traceback(tb)
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/urllib3/connection.py", line 234, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/lib/python3.8/http/client.py", line 1252, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1298, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1247, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1046, in _send_output
    self.send(chunk)
  File "/usr/lib/python3.8/http/client.py", line 968, in send
    self.sock.sendall(data)
  File "/usr/lib/python3.8/ssl.py", line 1204, in sendall
    v = self.send(byte_view[count:])
  File "/usr/lib/python3.8/ssl.py", line 1173, in send
    return self._sslobj.write(data)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/xxxxxxx/fd-cli/fd_cli/fd_cli_cmd_nft_recover.py", line 156, in fd_cli_cmd_nft_recover
    response = requests.post(
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/requests/api.py", line 117, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/xxxxxxx/fd-cli/venv/bin/fd-cli", line 33, in <module>
    sys.exit(load_entry_point('fd-cli', 'console_scripts', 'fd-cli')())
  File "/home/xxxxxxx/fd-cli/fd_cli/fd_cli.py", line 220, in main
    fd_cli()
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/xxxxxxx/fd-cli/venv/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/xxxxxxx/fd-cli/fd_cli/fd_cli.py", line 193, in fd_cli_nft_recover
    fd_cli_cmd_nft_recover(
  File "/home/xxxxxxx/fd-cli/fd_cli/fd_cli_cmd_nft_recover.py", line 179, in fd_cli_cmd_nft_recover
    fd_cli_print_raw(e, pre=pre)
  File "/home/xxxxxxx/fd-cli/fd_cli/fd_cli_print.py", line 15, in fd_cli_print_raw
    print(f'{" " * pre * 4}{value:{fill}s}')
TypeError: unsupported format string passed to ConnectionError.__format__
jfikar commented 3 years ago

It is probably wrong port number. I've seen the same TypeError: unsupported format string passed to ConnectionError.__format__