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

Invalid IPv6 URL #85

Open
lmazur opened this issue Mar 30, 2018 · 1 comment
Open

Invalid IPv6 URL #85

lmazur opened this issue Mar 30, 2018 · 1 comment

Comments

@lmazur
Copy link

lmazur commented Mar 30, 2018

Hello, I am running this in a Jupyter Notebook to test it.

Python - 2.7
My RPC server is on a AWS instance.

I get the following error on this call:
AuthServiceProxy("http://%s:%[email protected]:9009"%(rpc_user, rpc_password))

/anaconda/lib/python2.7/site-packages/bitcoinrpc/authproxy.pyc in init(self, service_url, service_name, timeout, connection)
84 self.__service_url = service_url
85 self.__service_name = service_name
---> 86 self.__url = urlparse.urlparse(service_url)
87 if self.__url.port is None:
88 port = 80

//anaconda/lib/python2.7/urlparse.pyc in urlparse(url, scheme, allow_fragments)
141 Note that we don't break the components up in smaller bits
142 (e.g. netloc is a single string) and we don't expand % escapes."""
--> 143 tuple = urlsplit(url, scheme, allow_fragments)
144 scheme, netloc, url, query, fragment = tuple
145 if scheme in uses_params and ';' in url:

//anaconda/lib/python2.7/urlparse.pyc in urlsplit(url, scheme, allow_fragments)
189 if (('[' in netloc and ']' not in netloc) or
190 (']' in netloc and '[' not in netloc)):
--> 191 raise ValueError("Invalid IPv6 URL")
192 if allow_fragments and '#' in url:
193 url, fragment = url.split('#', 1)

ValueError: Invalid IPv6 URL

How to resolve this?

@3Thiago
Copy link

3Thiago commented Mar 31, 2019

Hi Bro,

Did you solve this problem? I have the same problem!

return AuthServiceProxy('http://%s:%s@%s:%i]'%(rpc_username, rpc_password, rpc_ip, rpc_port))
File "/usr/local/lib/python3.6/dist-packages/bitcoinrpc/authproxy.py", line 86, in init
self.__url = urlparse.urlparse(service_url)
File "/usr/lib/python3.6/urllib/parse.py", line 368, in urlparse
splitresult = urlsplit(url, scheme, allow_fragments)
File "/usr/lib/python3.6/urllib/parse.py", line 418, in urlsplit
raise ValueError("Invalid IPv6 URL")
ValueError: Invalid IPv6 URL

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

2 participants