Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

api_instance.list_snapshot_snapshots Invalid value for shadow_bytes #62

Open

Description

@marcoval123

Hello,

I can't make api_instance.list_snapshot_snapshots work. I've got this error:

Invalid value for `shadow_bytes`, must be a value less than or equal to `4294967295`

Full traceback:

  File "adria.py", line 61, in get_last_snapshot
    api_response = api_instance.list_snapshot_snapshots(limit=limit, schedule=schedule)
  File "/usr/local/lib/python3.5/dist-packages/isilon_sdk/v9_4_0/api/snapshot_api.py", line 3125, in list_snapshot_snapshots
    (data) = self.list_snapshot_snapshots_with_http_info(**kwargs)  # noqa: E501
  File "/usr/local/lib/python3.5/dist-packages/isilon_sdk/v9_4_0/api/snapshot_api.py", line 3230, in list_snapshot_snapshots_with_http_info
    collection_formats=collection_formats)
  File "/usr/local/lib/python3.5/dist-packages/isilon_sdk/v9_4_0/api_client.py", line 346, in call_api
    _preload_content, _request_timeout)
  File "/usr/local/lib/python3.5/dist-packages/isilon_sdk/v9_4_0/api_client.py", line 185, in __call_api
    return_data = self.deserialize(response_data, response_type)
  File "/usr/local/lib/python3.5/dist-packages/isilon_sdk/v9_4_0/api_client.py", line 257, in deserialize
    return self.__deserialize(data, response_type)
  File "/usr/local/lib/python3.5/dist-packages/isilon_sdk/v9_4_0/api_client.py", line 296, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/usr/local/lib/python3.5/dist-packages/isilon_sdk/v9_4_0/api_client.py", line 671, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/usr/local/lib/python3.5/dist-packages/isilon_sdk/v9_4_0/api_client.py", line 274, in __deserialize
    for sub_data in data]
  File "/usr/local/lib/python3.5/dist-packages/isilon_sdk/v9_4_0/api_client.py", line 274, in <listcomp>
    for sub_data in data]
  File "/usr/local/lib/python3.5/dist-packages/isilon_sdk/v9_4_0/api_client.py", line 296, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/usr/local/lib/python3.5/dist-packages/isilon_sdk/v9_4_0/api_client.py", line 673, in __deserialize_model
    instance = klass(**kwargs)
  File "/usr/local/lib/python3.5/dist-packages/isilon_sdk/v9_4_0/models/snapshot_snapshot_extended_extended.py", line 104, in __init__
    self.shadow_bytes = shadow_bytes
  File "/usr/local/lib/python3.5/dist-packages/isilon_sdk/v9_4_0/models/snapshot_snapshot_extended_extended.py", line 395, in shadow_bytes
    raise ValueError("Invalid value for `shadow_bytes`, must be a value less than or equal to `4294967295`")  # noqa: E501
ValueError: Invalid value for `shadow_bytes`, must be a value less than or equal to `4294967295`

Do you have an idea ?

SDK VERSION -> isilon_sdk.v9_4_0

Activity

  1. marcoval123 commented on Jun 9, 2023

    @marcoval123
    Author

    Please, I need a resolution for this issue. Any updates?

  2. antonostrovsky commented on Jan 17, 2024

    @antonostrovsky

    Hi @marcoval123 ! I think this happening because:

    • This python API is auto-generated and includes a check for maximum integer size
    • The actual Isilon REST API must be returning a value larger than this
    • The check might be redundant, as Python int type can support any number as long as memory allows it

    The correct solution would be for maintainers of this project to re-generate the types correctly

    EDIT: a possible solution is for you to fork this and comment out the check if you believe the returned value is correct

  3. eugenevz-absa commented on Jan 2, 2025

    @eugenevz-absa

    I worked around it with a runtime reassignment of the setter method on the model class used by the list_snapshot_snapshots() method:

    from isilon_sdk import v9_5_0 as isi_sdk
    
    def override_shadow_bytes_setter():
        def shadow_bytes_setter(self, shadow_bytes):
            if shadow_bytes is None:
                raise ValueError("Invalid value for 'shadow_bytes', must not be 'None'")
            if shadow_bytes is not None and shadow_bytes > 9223372036854775807:
                raise ValueError("Invalid value for 'shadow_bytes', must be a value less than or equal to '9223372036854775807') 
    
            self._shadow_bytes = shadow_bytes
    
        isi_sdk.SnapshotSnapshotExtendedExtended.shadow_bytes = property(
            fget=isi_sdk.SnapshotSnapshotExtendedExtended.shadow_bytes.fget,
            fset=shadow_bytes_setter
        )
    
    override_shadow_bytes_setter()

    The check for shadow_bytes is increased from 4294967295 to 9223372036854775807. A tad annoying... this really needs to be fixed.

  4. mukeshguptakc commented on Feb 9, 2026

    @mukeshguptakc

    Using SDK isilon-sdk 0.7.0 and using version 9_7_0

    Observing the above error:

    >>> import isilon_sdk.v9_7_0 as isi970
    >>> snapshot_api = isi970.SnapshotApi(api_client)
    >>> snapshot_api.list_snapshot_snapshots()
    
      warnings.warn(
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python3.9/site-packages/isilon_sdk/v9_7_0/api/snapshot_api.py", line 3125, in list_snapshot_snapshots
        (data) = self.list_snapshot_snapshots_with_http_info(**kwargs)  # noqa: E501
      File "/usr/local/lib/python3.9/site-packages/isilon_sdk/v9_7_0/api/snapshot_api.py", line 3216, in list_snapshot_snapshots_with_http_info
        return self.api_client.call_api(
      File "/usr/local/lib/python3.9/site-packages/isilon_sdk/v9_7_0/api_client.py", line 341, in call_api
        return self.__call_api(resource_path, method,
      File "/usr/local/lib/python3.9/site-packages/isilon_sdk/v9_7_0/api_client.py", line 185, in __call_api
        return_data = self.deserialize(response_data, response_type)
      File "/usr/local/lib/python3.9/site-packages/isilon_sdk/v9_7_0/api_client.py", line 257, in deserialize
        return self.__deserialize(data, response_type)
      File "/usr/local/lib/python3.9/site-packages/isilon_sdk/v9_7_0/api_client.py", line 296, in __deserialize
        return self.__deserialize_model(data, klass)
      File "/usr/local/lib/python3.9/site-packages/isilon_sdk/v9_7_0/api_client.py", line 671, in __deserialize_model
        kwargs[attr] = self.__deserialize(value, attr_type)
      File "/usr/local/lib/python3.9/site-packages/isilon_sdk/v9_7_0/api_client.py", line 273, in __deserialize
        return [self.__deserialize(sub_data, sub_kls)
      File "/usr/local/lib/python3.9/site-packages/isilon_sdk/v9_7_0/api_client.py", line 273, in <listcomp>
        return [self.__deserialize(sub_data, sub_kls)
      File "/usr/local/lib/python3.9/site-packages/isilon_sdk/v9_7_0/api_client.py", line 296, in __deserialize
        return self.__deserialize_model(data, klass)
      File "/usr/local/lib/python3.9/site-packages/isilon_sdk/v9_7_0/api_client.py", line 673, in __deserialize_model
        instance = klass(**kwargs)
      File "/usr/local/lib/python3.9/site-packages/isilon_sdk/v9_7_0/models/snapshot_alias_extended.py", line 104, in __init__
        self.shadow_bytes = shadow_bytes
      File "/usr/local/lib/python3.9/site-packages/isilon_sdk/v9_7_0/models/snapshot_alias_extended.py", line 395, in shadow_bytes
        raise ValueError("Invalid value for `shadow_bytes`, must be a value less than or equal to `4294967295`")  # noqa: E501
    ValueError: Invalid value for `shadow_bytes`, must be a value less than or equal to `4294967295`
    
  5. mukeshguptakc commented on Feb 19, 2026

    @mukeshguptakc

    This issue is resolved using the latest SDK version and v9_12_0 module.
    pip-3.9 install isilon-sdk==0.7.0
    Successfully installed isilon-sdk-0.7.0

    import isilon_sdk.v9_12_0 as isi912
    snap_resp = snapshot_api.list_snapshot_snapshots(resume=resume)

    This handles the earlier exception observed and provides the snapshot responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions