Skip to content

.open(retries=n) method didn't work as expected. #824

@firmanadiyuda

Description

@firmanadiyuda

Component
What is the bug in?

  • SDKs (Python)

Describe the bug
If I try to specify timeout and retries when opening a connection, it is not working as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Run this code:
import asyncio
from pathlib import Path

from open_gopro import WirelessGoPro
from open_gopro.util.logger import setup_logging

logger = setup_logging(__name__, Path("my_log.log"))


async def main():
    gopro = WirelessGoPro(interfaces=[WirelessGoPro.Interface.BLE])
    await gopro.open(timeout=5, retries=2)


asyncio.run(main())

Expected behavior
I am expecting a connection timeout in 5s and will retry to connect 2x when there is no GoPro detected, but getting 5x retries instead.

Logs
gopro.log

Hardware

  • Camera: Hero12 Black.
  • MacOS Sequoia 15.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNeeds to be reviewed and assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions