Skip to content

TypeError: TarFile.extractall() got an unexpected keyword argument 'filter' when running openai migrate #1435

@imene-swaan

Description

@imene-swaan

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

When running the openai migrate command to update my code to the latest version due to deprecated functions, I encountered a TypeError. The error message indicates that the TarFile.extractall() method received an unexpected keyword argument filter. The error seems to originate from the migrate.py file within the openai package, specifically from the line attempting to call archive.extractall with an unsupported filter argument.

To Reproduce

  1. Run this command in your terminal:
    openai migrate
  2. Observe the error message:

Retrieving Grit CLI metadata from https://api.keygen.sh/v1/accounts/custodian-dev/artifacts/marzano-macos-arm64 Traceback (most recent call last): File "path/to/openai", line 8, in <module> sys.exit(main()) ^^^^^^ File "path/to/_cli.py", line 129, in main _main() File "path/to/_cli.py", line 209, in _main parsed.func( File "path/to/migrate.py", line 53, in migrate grit_path = install() ^^^^^^^^^ File "path/to/migrate.py", line 141, in install archive.extractall(unpacked_dir, filter="data") TypeError: TarFile.extractall() got an unexpected keyword argument 'filter'

Code snippets

No response

OS

macos

Python version

3.11.3

Library version

1.30.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions