Closed LucaV27 closed 4 years ago
hello,
Can you provide more information about what your script is doing?
Are you creating the object project and then opening the project first with project.open() ?
Have you tried running the script execution step by step on ipython or the pyhton interpreter ?
Please share more information about your issue
Regards!
Hi, actually it's a pretty simple script...
gns3_server = gns3fy.Gns3Connector('http://localhost:3080')
project = gns3_server.get_project(project_id='f5fa7cc8-e998-4814-b30f-e68f30448531')['name']
test = gns3fy.Project(name=project, connector=gns3_server)
test.get()
test.open()
# time.sleep(1)
test.close()
BR
Additionaly, I was checking the function close() in Project class of gns3fy.py
it gives error when it tries to handle the _response.json() object. It seems that the _response gives 204 response (as 'requests.models.Response'), but empty, so .json() function gives that error. To temporarily solve this issue i changed the function close() in Project class:
# self._update(_response.json())
self._update({"status": "closed"})
and it works. BR
Thanks, could be that they changed the response on the new version
Seems I might be able to create a patch soon
Thanks a lot
Hey @LucaV27, should be fixed on 0.7.0 - can you take verify?
Hi @davidban77! I could verify it. I will close the issue. Thanks
Hi, When i try to close a project, it gives me this error:
I'm using gns3fy v0.6.0 (on Python3.6.10) and gns3server v2.2.7