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

🐛 : TypeError: ClientBase.__init__() takes from 1 to 3 positional arguments but 4 positional arguments (and 1 keyword-only argument) were given #317

Open
hemangjoshi37a opened this issue Jan 22, 2023 · 1 comment

Comments

@hemangjoshi37a
Copy link

hemangjoshi37a commented Jan 22, 2023

Code :

import ipfsapi
api = ipfsapi.connect('127.0.0.1', 5001)
res = api.add('test.txt')
res

Error :

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[11], line 2
      1 import ipfsapi
----> 2 api = ipfsapi.connect('127.0.0.1', 5001)
      3 res = api.add('test.txt')
      4 res

File ~/.local/lib/python3.11/site-packages/ipfsapi/client/__init__.py:85, in connect(host, port, base, chunk_size, **defaults)
     64 """Create a new :class:`~ipfsapi.Client` instance and connect to the
     65 daemon to validate that its version is supported.
     66 
   (...)
     82 	~ipfsapi.Client
     83 """
     84 # Create client instance
---> 85 client = Client(host, port, base, chunk_size, **defaults)
     87 # Query version number from daemon and validate it
     88 assert_version(client.version()['Version'])

File ~/.local/lib/python3.11/site-packages/ipfsapi/client/__init__.py:190, in Client.__init__(self, host, port, base, chunk_size, **defaults)
    187 	pass
    189 addr = "/{0}/{1}/tcp/{2}/{3}".format(host_type, url.hostname, url.port, url.scheme)
--> 190 super(Client, self).__init__(addr, base, chunk_size, timeout=None, **defaults)

TypeError: ClientBase.__init__() takes from 1 to 3 positional arguments but 4 positional arguments (and 1 keyword-only argument) were given
@hemangjoshi37a hemangjoshi37a changed the title TypeError: ClientBase.__init__() takes from 1 to 3 positional arguments but 4 positional arguments (and 1 keyword-only argument) were given 🐛 : TypeError: ClientBase.__init__() takes from 1 to 3 positional arguments but 4 positional arguments (and 1 keyword-only argument) were given Jan 22, 2023
@kasteph
Copy link
Collaborator

kasteph commented May 16, 2023

@hemangjoshi37a what kubo version are you using?

You can get it by running this in your shell:

ipfs --version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants