KonradIT / gopro-py-api

Unofficial GoPro API Library for Python - connect to GoPro via WiFi.
MIT License
1.38k stars 211 forks source link

ValueError: unknown url type: '' #174

Open baditaflorin opened 3 years ago

baditaflorin commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce

from goprocam import GoProCamera
from goprocam import constants

gpCam = GoProCamera.GoPro()
TIMER=1
gpCam.getStatusRaw()
gpCam.downloadLastMedia(gpCam.take_photo(TIMER)) #take a photo in 4 seconds and download it.
download_pic_in_4s.py
HERO7 Black
HD7.01.01.90.00
Camera successfully connected!
filename: 
size: 
Traceback (most recent call last):
  File "/Users/florin/synology_send_to_cloud_oneway/Coding/go_po_api_webcam/gopro-py-api/examples/download_pic_in_4s.py", line 7, in <module>
    gpCam.downloadLastMedia(gpCam.take_photo(TIMER)) #take a photo in 4 seconds and download it.
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/goprocam/GoProCamera.py", line 878, in downloadLastMedia
    urllib.request.urlretrieve(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 247, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 509, in open
    req = Request(fullurl, data)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 328, in __init__
    self.full_url = url
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 354, in full_url
    self._parse()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 383, in _parse
    raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: ''

Expected behavior to work and get the picture Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information): Mac Os Catalina

Additional context Add any other context about the problem here.