Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

SyntaxError: duplicate argument 'interfaces' in function definition

Đang mở Phù hợp với người mới
#6 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
75/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu với phần định nghĩa init trong corellium_api/models/partial_update_interconnect_request.py, khoảng dòng 50, sau đó so sánh model được tạo với client 0.4.1 hoặc phiên bản repository được tham chiếu trong báo cáo. Xác nhận rằng package được import thành công và CorelliumApi có thể được khởi tạo mà không gặp SyntaxError do đối số trùng lặp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Description

Corellium SDK version installed via pip: corellium-api==0.4.2

I followed the instructions in the README file. This is my code that is reproducing the error:

from __future__ import print_function

import asyncio
import corellium_api

HOST = "https://***.corellium.com/api" # redacted
USERNAME = "testuser"
PASSWORD = "testpass"
configuration = corellium_api.Configuration(
    host=HOST,
    username=USERNAME,
    password=PASSWORD,
)

async def main():
    async with corellium_api.ApiClient(configuration) as api_client:
        # Create an instance of the API class
        client = corellium_api.CorelliumApi(api_client)

        project = await client.v1_get_project(
            project_id="<some-project-id>"
        )

if __name__ == "__main__":
    asyncio.run(main())

When running the code above, this produces a SyntaxError:

Traceback (most recent call last):
  File "PythonVenvs/corellium-sdk/main.py", line 4, in <module>
    import corellium_api
  File "PythonVenvs/corellium-sdk/venv/lib/python3.11/site-packages/corellium_api/__init__.py", line 20, in <module>
    from corellium_api.api.corellium_api import CorelliumApi
  File "PythonVenvs/corellium-sdk/venv/lib/python3.11/site-packages/corellium_api/api/__init__.py", line 6, in <module>
    from corellium_api.api.corellium_api import CorelliumApi
  File "PythonVenvs/corellium-sdk/venv/lib/python3.11/site-packages/corellium_api/api/corellium_api.py", line 20, in <module>
    from corellium_api.api_client import ApiClient
  File "PythonVenvs/corellium-sdk/venv/lib/python3.11/site-packages/corellium_api/api_client.py", line 28, in <module>
    import corellium_api.models
  File "PythonVenvs/corellium-sdk/venv/lib/python3.11/site-packages/corellium_api/models/__init__.py", line 121, in <module>
    from corellium_api.models.partial_update_interconnect_request import PartialUpdateInterconnectRequest
  File "PythonVenvs/corellium-sdk/venv/lib/python3.11/site-packages/corellium_api/models/partial_update_interconnect_request.py", line 50
    def __init__(self, name=None, interfaces=None, interfaces=None, local_vars_configuration=None):  # noqa: E501
                                                   ^^^^^^^^^^
SyntaxError: duplicate argument 'interfaces' in function definition

Looking at the file here in this repo yields the same results for duplicate interfaces being passed (referenced here). As a result, this does not allow me to even instantiate the client because it fails immediately when trying to instantiate CorelliumApi.

When I use the previous client here, it works without issues.

This also doesn't appear to happen on corellium-api==0.4.1.

Ngôn ngữ chính
Python
Star
15
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của corellium/python-api-client

Tất cả issue của corellium/python-api-client

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.