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

baseclient.py has stopped working.. KeyError: 'ns0' #21

Open
JacobHJ opened this issue Dec 13, 2022 · 1 comment
Open

baseclient.py has stopped working.. KeyError: 'ns0' #21

JacobHJ opened this issue Dec 13, 2022 · 1 comment

Comments

@JacobHJ
Copy link

JacobHJ commented Dec 13, 2022

Hi. I’m having issues running the following code, which has been working flawlessly until recently:

from betdaq.apiclient import APIClient
api = APIClient('username', 'password')
sport_ids = api.marketdata.get_sports()

error:

Traceback (most recent call last):
File "C:\Users\UK\AppData\Local\Programs\Python\Python37\lib\site-packages\zeep\xsd\schema.py", line 172, in get_ns_prefix
return self._prefix_map_custom[prefix]
KeyError: 'ns0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\UK\AppData\Local\Programs\Python\Python37\lib\site-packages\zeep\xsd\schema.py", line 174, in get_ns_prefix
return self._prefix_map_auto[prefix]
KeyError: 'ns0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\UK\Desktop\Betdaq test.py", line 2, in
api = APIClient('username', password')
File "C:\Users\UK\AppData\Local\Programs\Python\Python37\lib\site-packages\betdaq\apiclient.py", line 8, in init
super(APIClient, self).init(username, password)
File "C:\Users\UK\AppData\Local\Programs\Python\Python37\lib\site-packages\betdaq\baseclient.py", line 13, in init
self.initialise_type_factories()
File "C:\Users\UK\AppData\Local\Programs\Python\Python37\lib\site-packages\betdaq\baseclient.py", line 33, in initialise_type_factories
self.readonly_types = self.readonly_client.type_factory('ns0')
File "C:\Users\UK\AppData\Local\Programs\Python\Python37\lib\site-packages\zeep\client.py", line 238, in type_factory
return Factory(self.wsdl.types, 'type', namespace)
File "C:\Users\UK\AppData\Local\Programs\Python\Python37\lib\site-packages\zeep\client.py", line 78, in init
self._ns = types.get_ns_prefix(namespace)
File "C:\Users\UK\AppData\Local\Programs\Python\Python37\lib\site-packages\zeep\xsd\schema.py", line 176, in get_ns_prefix
raise ValueError("No such prefix %r" % prefix)
ValueError: No such prefix 'ns0'

Thanks a lot for any kind of attention.
Best regards
Jacob

@JacobHJ
Copy link
Author

JacobHJ commented Dec 13, 2022

changing the url of the WSDL file in baseclient.py to:
'https://api.betdaq.com/v2.0/API.wsdl'
solved my issue.

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

1 participant