kbr / fritzconnection

Python-Tool to communicate with the AVM Fritz!Box by the TR-064 protocol and the AHA-HTTP-Interface
MIT License
304 stars 59 forks source link

Tool does not work with port ranges #35

Open Lemocin opened 4 years ago

Lemocin commented 4 years ago

I need to forward multiple ports, so i configured a port-forwarding range. If i try to get it with your tool, i get this error:


  File "<input>", line 1, in <module>
  File "C:\Users\kimm8\PycharmProjects\arithmetische\venv\lib\site-packages\fritzconnection\core\fritzconnection.py", line 209, in call_action
    return self.soaper.execute(service, action_name, arguments)
  File "C:\Users\kimm8\PycharmProjects\arithmetische\venv\lib\site-packages\fritzconnection\core\soaper.py", line 170, in execute
    return handle_response(response)
  File "C:\Users\kimm8\PycharmProjects\arithmetische\venv\lib\site-packages\fritzconnection\core\soaper.py", line 154, in handle_response
    return self.parse_response(response, service, action_name)
  File "C:\Users\kimm8\PycharmProjects\arithmetische\venv\lib\site-packages\fritzconnection\core\soaper.py", line 197, in parse_response
    value = self.conversion_table[data_type](value)
ValueError: invalid literal for int() with base 10: '27005-27015'
kbr commented 4 years ago

Thanks for reporting, I was able to reproduce this. In case that a port-range is configured, the box returns a formatted string instead of a single ui2 value as described by the related SCDP informations provided by the router. This is something that should get clarified with the vendor before further actions.