# ask-community

Chris Nogradi

07/13/2023, 9:10 PM
I am having trouble using repository_definition.load_asset_value() with a partition_key for a loading an asset that has a single partition. The problem occurs in the io_manager where the context.asset_partition_keys is not a list but a string that was sliced. I looked at the code and this looks suspicious to me (from[…]python_modules/dagster/dagster/_core/execution/context/ def get_partition_keys(self, current_time: Optional[datetime] = None) -> Iterable[str]: if self._key_range.start == self._key_range.end: return self._key_range.start else: raise NotImplementedError() since it seems to return a string but the type on the return is an iterable. Is this intentional? I changed the code to return [self._key_range.start] and the code I am working with now behaves properly. Maybe this code is correct and I am doing something wrong in the IO Manager but I can't imagine what it might be since I am using the upath_io_manager as my base. Thoughts?


07/13/2023, 10:33 PM
sounds to me like you’ve encountered a bug. You’re welcome to either submit a PR, or add an issue and someone on the team will take care of this ASAP. In any case, thanks for tracking it down!