OpenGoPro icon indicating copy to clipboard operation
OpenGoPro copied to clipboard

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

Open firmanadiyuda opened this issue 4 months ago • 0 comments

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

firmanadiyuda avatar Aug 31 '25 14:08 firmanadiyuda