Skip to content

Erro lab.create() #117

@nguyentheanhhnd

Description

@nguyentheanhhnd

I try run script:


server = Gns3Connector(url="http://localhost:3080")
lab = Project(name="check", connector=server)
try:
    lab.create()
    print("Project created successfully")
except ValueError as e:
    print(f"Error creating project: {e}")
print(server.projects_summary())
print(lab.status)

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions