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

AttributeError: enderecoERP instance has no attribute 'id' #140

Open
lcspereira opened this issue Nov 22, 2018 · 0 comments
Open

AttributeError: enderecoERP instance has no attribute 'id' #140

lcspereira opened this issue Nov 22, 2018 · 0 comments

Comments

@lcspereira
Copy link

Hi,

I'm having this error when I try to query any CEPs. I ran update-correios-wsdl, but this error continues.
Here is the StackTrace:

Traceback (most recent call last):
File "/home/lucas/anaconda3/lib/python3.6/site-packages/zeep/xsd/valueobjects.py", line 138, in getattribute
return self.values[key]
KeyError: 'id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/lucas/anaconda3/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/home/lucas/anaconda3/lib/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/lucas/anaconda3/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/run/media/lucas/COMMON/programas/python/labengsoft/mainapp/views.py", line 58, in enderecoByCepView
endereco = serializers.serialize ('json', [ Endereco.getEnderecoByCep(str(cep)) ])
File "/run/media/lucas/COMMON/programas/python/labengsoft/mainapp/models.py", line 186, in getEnderecoByCep
zip = cliente.find_zipcode(ZipCode(cep))
File "/home/lucas/anaconda3/lib/python3.6/site-packages/correios/client.py", line 153, in find_zipcode
return self.model_builder.build_zip_address(zip_address_data)
File "/home/lucas/anaconda3/lib/python3.6/site-packages/correios/models/builders.py", line 98, in build_zip_address
id=zip_address_data.id,
File "/home/lucas/anaconda3/lib/python3.6/site-packages/zeep/xsd/valueobjects.py", line 142, in getattribute
self.class.name, key))
AttributeError: enderecoERP instance has no attribute 'id'

Any advice?
Thanks.

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