Open sachin-apa opened 6 months ago
The Issue is because of the regex used'^((\/[^\/[:cntrl:]]+)(\/?))*$'
Python regex library is not recognising [:cntrl:] as control parameters, but is just considering as a regular text matching c t r l and hence the SDK is throwing error.
>>> import re
>>> re.search('^((\/[^\/[:cntrl:]]+)(\/?))*$', "/ifs/data" )
>>> re.search('^((\/[^\/[:cntrl:]]+)(\/?))*$', "/]]]]]]/" )
<re.Match object; span=(0, 8), match='/]]]]]]/'>
Alternative to [:cntrl:] in python is to use [\x00-\x1F\x7F]
so the regular expression would be ^((\/[^\x00-\x1F\x7F]+)(\/?))*$
>>> re.search('^((\/[^\x00-\x1F\x7F]+)(\/?))*$', "/]]]]]]/" )
<re.Match object; span=(0, 8), match='/]]]]]]/'>
>>> re.search('^((\/[^\x00-\x1F\x7F]+)(\/?))*$', "/ifs/data" )
<re.Match object; span=(0, 9), match='/ifs/data'>
I encountered the same error while attempting to retrieve the details of the ADS provider using this method: Isilon SDK v0.3.0.1 AuthApi. The call fails with the following error:
ValueError: Invalid value for
home_directory_template
, must follow a pattern or be equal to/^((\/[^\/[:cntrl:]]+)(\/?))*$/
.
However, this method works in SDK version 9.1, as referenced here.
While creating a event channel, when a path is specified for custom template field it fails with an error as regex is not matching.
Run the script with a below code where custom_template field is given an input as "/ifs/data"
Actual Fails with an error as below
Expected
Create event channel as the input "/ifs/data/" is a correct input for the field "custom_template".