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

Unable to connect to Chains Using Python and In3 2.5.4 #18

Closed
HopkinsAC opened this issue Aug 10, 2020 · 3 comments
Closed

Unable to connect to Chains Using Python and In3 2.5.4 #18

HopkinsAC opened this issue Aug 10, 2020 · 3 comments

Comments

@HopkinsAC
Copy link

Steps to reproduce

  1. Codified first programming block for the connect_to_ethereum.py sample.
  2. Executed the python code.

Expected behavior

  1. I should get the block number and gas price as indicated in the sample.

Actual behavior

  1. I received an invalid url error indicating that the transport was not http.

Traceback (most recent call last):
File "C:/Users/Andy/Documents/GitHub/Pytherium/main.py", line 8, in
RegistryPresenter(get_entries(), EntryView(), EntryInteractor())
File "C:\Users\Andy\Documents\GitHub\Pytherium\Pytherium\Models.py", line 6, in get_entries
latest_block = client.eth.block_number()
File "C:\Users\Andy\Documents\GitHub\Pytherium\venv\lib\site-packages\in3\eth\api.py", line 47, in block_number
return self._factory.get_integer(self._runtime.call(EthMethods.BLOCK_NUMBER))
File "C:\Users\Andy\Documents\GitHub\Pytherium\venv\lib\site-packages\in3\libin3\runtime.py", line 63, in call
raise ClientException(str(error))
in3.exception.ClientException: b'invalid url must sart with http'

System configuration

Windows 10 Home

Python 3.8.5
PyCharm Community 2020.2

Incubed version

in3-2.5.4

Request

client = in3.Client()
latest_block = client.eth.block_number()

Incubed Configuration

  1. Standard pip installation:
    pip3 install in3

Chain

  1. Tried the default, got the error.
  2. Tried the Kovan chain, got the error.
@tucanae47
Copy link

Hello @HopkinsAC, can you please try with version 2.4.2 pip install -Iv in3==2.4.2, we are investigating the issue, we will release a new version soon, 2.5.X versions are still under development.

@simon-jentzsch
Copy link
Contributor

I was able to reproduce it and fix it. The issue was the wrong transport used. When the first client is created all plugin compiled with it will be registered as default and as such, the http-transport (which is only able to handle http, no https) was registered as well, but python uses its own transport-function, which was simply registered too early, so it was overridden with the default. This is fixed now.
I will push a bugfix -release as soon as possible.

@simon-jentzsch
Copy link
Contributor

fixed it version 3.0.1
https://pypi.org/project/in3/

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

3 participants