4

I've run the Sonos Self-Test Suite available here and everything passes except for this one error, and I'm not sure why:

Test case: PollingIntervalTest test_getlastupdate_no_change
Instance messages: could not convert string to float

...more output...
2016-02-23 09:43:40,834 [STOP] SONOS.sonos.workflow.fixture.PollingIntervalTest - could not convert string to float:
2016-02-23 09:43:40,834 [STOP] SONOS.sonos.workflow.fixture.PollingIntervalTest - 1212827 PollingIntervalTest test_getlastupdate_no_change
2016-02-23 09:43:40,836 [DEBUG] SONOS.sonos.workflow.fixture.PollingIntervalTest - [('../../sonos-1.1.0.dev_r208947-py2.7.egg/sonos/workflow/fixture.py', 2494, '_run_test_iteration', 'testMethod()'), ('/Users/rob/Dropbox/dev/projects/composed/sonos_downloads/sonos-selftest/smapi/content_workflow/getlastupdate.py', 40, 'test_getlastupdate_no_change', 'poll_interval = self.smapiservice.get_polling_interval()'), ('../../sonos-1.1.0.dev_r208947-py2.7.egg/sonos/smapi/smapiservice.py', 374, 'get_polling_interval', "pollinterval = self.config.getfloat('Polling Interval', 'interval')")]
2016-02-23 09:43:40,836 [INFO] SONOS.sonos.workflow.fixture.PollingIntervalTest - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
2016-02-23 09:43:40,836 [INFO] SONOS.sonos.workflow.result - End *test case* test_getlastupdate_no_change at Tuesday, February 23, 2016 09:43 AM

Here's what my service returns:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.sonos.com/Services/1.1">
  <soap:Body>
    <tns:getLastUpdateResponse>
      <getLastUpdateResult>
        <catalog>2016-02-18 11:52:30</catalog>
        <favorites>Rob-2016-02-18 12:01:00</favorites>
        <pollInterval>30</pollInterval>
     </getLastUpdateResult>
   </tns:getLastUpdateResponse>
  </soap:Body>
</soap:Envelope>

It seems virtually identical to the sample response in the Sonos API docs. You can see that pollInterval has no type information specified in the SOAP XML, so I'm struggling to see how this error is due to something I'm doing.

Am I doing something wrong, or could this be a problem with the test suite itself?

Rob Isenberg
  • 161
  • 5

1 Answers1

0

I believe this may be an issue with the selftest's handling of special characters, specifically ":", within token values. If possible, try returning simply an integer as specified in the sample response to see if this resolves the issue.

Allison
  • 141
  • 1