Open nguyentheanhhnd opened 9 months ago
Can you post the version of GNS3 you are using and the version of pydantic as well?
I am currently using GNS3 version 2.2.44.1, Python 3.8.10, and Ubuntu 20.04.6 LTS.
I'm also having difficulty with node creation and link creation. Do you have any examples for this? thank you
Here is a link to the documentation for node creation: https://davidban77.github.io/gns3fy/user-guide/#node-creation
Link creation is just after it.
I had the same error, using 'pip install gns3fy' on Ubuntu 20.04.
A dirty hack is to get the newest version of 'gns3fy.py' from GitHub (either clone the repos or make a raw copy of the file).
Then overwrite the existing file (which seems to be /usr/local/lib/python3.8/dist-packages/gns3fy/gns3fy.py in your case).
This fixes the 'pydantic_initialised was unexpected' error.
The "proper" solution (according to the documentation) to install the cloned GitHub version is using 'poetry', but this doesn't seem to work with Python 3.8.
I try run script:
this is erro : python3 vidu2.py Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/gns3fy/gns3fy.py", line 141, in http_call _response.raise_for_status() File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://localhost:3080/v2/projects
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "vidu2.py", line 12, in
lab.create()
File "/usr/local/lib/python3.8/dist-packages/gns3fy/gns3fy.py", line 1264, in create
_response = self.connector.http_call("post", _url, json_data=data)
File "/usr/local/lib/python3.8/dist-packages/gns3fy/gns3fy.py", line 143, in http_call
raise HTTPError(
requests.exceptions.HTTPError: 400: JSON schema error with API request '/v2/projects' and JSON data '{'name': 'demo2', 'pydantic_initialised': True}': Additional properties are not allowed ('pydantic_initialised' was unexpected)