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

Error creating SwaggerClient #6

Open
jonocodes opened this issue Aug 18, 2014 · 0 comments
Open

Error creating SwaggerClient #6

jonocodes opened this issue Aug 18, 2014 · 0 comments

Comments

@jonocodes
Copy link

Here is my code:

from swaggerpy.client import SwaggerClient
from swaggerpy.http_client import SynchronousHttpClient
http_client = SynchronousHttpClient()

client = ari = SwaggerClient("http://petstore.swagger.wordnik.com/api/api-docs",http_client=http_client)

Here is the error:

  File "/home/jfinger/Desktop/swagger-py/swaggerpy/client.py", line 178, in __init__
    self.api_docs = loader.load_resource_listing(url_or_resource)
  File "/home/jfinger/Desktop/swagger-py/swaggerpy/swagger_model.py", line 170, in load_resource_listing
    self.load_api_declaration(base_url, api)
  File "/home/jfinger/Desktop/swagger-py/swaggerpy/swagger_model.py", line 187, in load_api_declaration
    api_dict['url'] = urlparse.urljoin(base_url + '/', path.strip('/'))
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Looks like this is because the loader is looking for something called 'basePath' in the Json.

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