Parameter search with Python

Hello,

I wanted to try the " Parameter search with Python" code found in the documentation.
I used the correct api key and can curl the impulse, but in the Python code I get the following error. How can I solve this error:

		Trying filter cutoff 2.0
	None
	Traceback (most recent call last):
	  File "automate-search.py", line 145, in <module>
		retrain(filter_cutoff=cutoff)
	  File "automate-search.py", line 87, in retrain
		curr_impulse = impulse_api.get_impulse(PROJECT_ID)
	  File "C:\Users\jurg\Documents\ei\Parameter_search_with_Python\lib\site-packages\edge_impulse_sdk\api\impulse_api.py", line 182, in get_impulse
		return self.get_impulse_with_http_info(project_id, **kwargs)  # noqa: E501
	  File "C:\Users\jurg\Documents\ei\Parameter_search_with_Python\lib\site-packages\edge_impulse_sdk\api\impulse_api.py", line 251, in get_impulse_with_http_info
		return self.api_client.call_api(
	  File "C:\Users\jurg\Documents\ei\Parameter_search_with_Python\lib\site-packages\edge_impulse_sdk\api_client.py", line 337, in call_api
		return self.__call_api(resource_path, method,
	  File "C:\Users\jurg\Documents\ei\Parameter_search_with_Python\lib\site-packages\edge_impulse_sdk\api_client.py", line 181, in __call_api
		return_data = self.deserialize(response_data, response_type)
	  File "C:\Users\jurg\Documents\ei\Parameter_search_with_Python\lib\site-packages\edge_impulse_sdk\api_client.py", line 253, in deserialize
		return self.__deserialize(data, response_type)
	  File "C:\Users\jurg\Documents\ei\Parameter_search_with_Python\lib\site-packages\edge_impulse_sdk\api_client.py", line 292, in __deserialize
		return self.__deserialize_model(data, klass)
	  File "C:\Users\jurg\Documents\ei\Parameter_search_with_Python\lib\site-packages\edge_impulse_sdk\api_client.py", line 632, in __deserialize_model
		kwargs[attr] = self.__deserialize(value, attr_type)
	  File "C:\Users\jurg\Documents\ei\Parameter_search_with_Python\lib\site-packages\edge_impulse_sdk\api_client.py", line 292, in __deserialize
		return self.__deserialize_model(data, klass)
	  File "C:\Users\jurg\Documents\ei\Parameter_search_with_Python\lib\site-packages\edge_impulse_sdk\api_client.py", line 634, in __deserialize_model
		instance = klass(**kwargs)
	  File "C:\Users\jurg\Documents\ei\Parameter_search_with_Python\lib\site-packages\edge_impulse_sdk\models\impulse.py", line 64, in __init__
		self.window_size_ms = window_size_ms
	  File "C:\Users\jurg\Documents\ei\Parameter_search_with_Python\lib\site-packages\edge_impulse_sdk\models\impulse.py", line 138, in window_size_ms
		raise ValueError("Invalid value for `window_size_ms`, must not be `None`")  # noqa: E501
	ValueError: Invalid value for `window_size_ms`, must not be `None`

Hi @Jurg, sorry, bitrot on the example. I’ve updated the SDK package (to 1.2.0) and the example on the docs page: https://docs.edgeimpulse.com/v1.0/docs/parameter-search-with-python

We’ll probably retire the SDK package soon in favor of the documentation and examples in the API.

1 Like