Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Getting error for calling save() method #126

Closed
vzaletny opened this issue Dec 7, 2018 · 0 comments
Closed

Getting error for calling save() method #126

vzaletny opened this issue Dec 7, 2018 · 0 comments

Comments

@vzaletny
Copy link

vzaletny commented Dec 7, 2018

Hi.

Caling method save() for a changed object get an error:
File "/opt/python3.6/site-packages/pynetbox/core/response.py", line 358, in save
diff = self._diff()
File "/opt/python3.6/site-packages/pynetbox/core/response.py", line 333, in _diff
{fmt_dict(k, v) for k, v in self.serialize().items()}
File "/opt/python3.6/site-packages/pynetbox/core/response.py", line 333, in
{fmt_dict(k, v) for k, v in self.serialize().items()}
File "/opt/python3.6/site-packages/pynetbox/core/response.py", line 329, in fmt_dict
return k, "".join(v)
TypeError: sequence item 0: expected str instance, int found

In file pynetbox/core/response.py
Line: 329
return k, "".join(v)
should change to
return k, "".join(map(str, v))

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants