Skip to content

TypeError: save_to_csv() got an unexpected keyword argument 'path' #301

Closed

Description

@Mensen

Bug/Issue Description:
A clear and concise description of what the bug or issue is - in other words, what the unexpected behavior or output is.

Only when using the AdaptiveDetector do I receive a TypeError. Seemingly after the actual detection is complete. I tried to explicitly define a path for the stats_file_path but received the same error. Its unclear why this happens (I've tried looking in init.py but I'm unsure why the "path" argument is still unexpected.

Required Information:
Provide the following information to assist with reporting the bug:

  1. Provide a full copy of the command line options you are using, for example:

scene_list = detect(video_file, AdaptiveDetector())
Traceback (most recent call last):
File "", line 1, in
File "E:\research\python_toolboxes\anaconda_3\envs\video_edits\lib\site-packages\scenedetect_init_.py", line 194, in detect
path=stats_file_path, base_timecode=video.base_timecode)
TypeError: save_to_csv() got an unexpected keyword argument 'path'

>>> scene_list = detect(video_file, AdaptiveDetector(), stats_file_path=base_path)
Traceback (most recent call last):
File "", line 1, in
File "E:\research\python_toolboxes\anaconda_3\envs\video_edits\lib\site-packages\scenedetect_init_.py", line 194, in detect
path=stats_file_path, base_timecode=video.base_timecode)
TypeError: save_to_csv() got an unexpected keyword argument 'path'

  1. Add -v debug -l BUG_REPORT.txt to the beginning of the command, then re-run PySceneDetect and attach the generated BUG_REPORT.txt file.

Unfortunately I'm not sure how to generate this when running within python

Expected Behavior:

I expect the detection to run without this error and return the same list of scenes as with the other detector options.

Computing Environment:

  • OS: Windows
  • Python Version: 3.7.12
  • OpenCV Version: 4.6.0.66

Activity

  1. wjs018 commented on Nov 15, 2022

    @wjs018
    Collaborator

    Duplicate of #299. Currently there is a PR to address this, #300 (hopefully merged soon). Will mark this as closed to consolidate discussion over there.

  2. linked a pull request that will close this issueFix Named Argument #300on Nov 15, 2022
  3. Mensen commented on Nov 16, 2022

    @Mensen
    Author

    Wonderful thank you!

  4. Mensen commented on Nov 16, 2022

    @Mensen
    Author

    I can confirm the fix works for the issue I had.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions