Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

SyntaxError: duplicate argument 'interfaces' in function definition

Offen Anfängerfreundlich
#6 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
75/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Ruhig
Tech-Stack
python
Bereich
api

Rechercherichtung

Beginne bei der Definition von init in corellium_api/models/partial_update_interconnect_request.py ungefähr in Zeile 50 und vergleiche dann das generierte Modell mit dem 0.4.1-Client oder der im Bericht referenzierten Repository-Version. Bestätige, dass das Paket erfolgreich importiert werden kann und dass CorelliumApi ohne den SyntaxError aufgrund doppelter Argumente instanziiert werden kann.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Python
Sterne
15
Forks
1
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus corellium/python-api-client

Alle Issues in corellium/python-api-client

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.