pinecone-datasets
pinecone-datasets copied to clipboard
Fix Windows path handling for cloud storage
Use posixpath.join instead of os.path.join to ensure consistent forward slashes for cloud storage paths across all platforms. This resolves the FileNotFoundError: b//o on Windows.
Description
This PR fixes an issue with path handling on Windows platforms. The problem occurs because os.path.join() uses backslashes (\) as path separators on Windows, but cloud storage systems like GCS require forward slashes (/).
Changes Made
- Added a helper method
_join_cloud_pathto handle cloud storage path joining consistently across platforms - Used
posixpath.join()instead ofos.path.join()for all cloud storage path operations - Added debug logging to help diagnose path-related issues
Testing
Tested and confirmed working on Windows 11 Pro.
Issue
Fixes the FileNotFoundError: b//o error when using the library on Windows.