Skip to content

Error when trying to upload folders : lexical error: invalid char in json text #139

@MorHeene

Description

@MorHeene

When trying to upload a folder containing several subfolders I keep getting the following error, even after updating to the latest version:

Code:

cr_project <- osf_retrieve_node("MyOSFprojectNode")
osf_ls_files(cr_project, type = "folder")
target_dir <- osf_ls_files(cr_project, path = "Output", pattern = "FolderNameOnOSF")  # Define the target directory: Selecting the "FolderNameOnOSF" subdirectory within top-level "Output" directory.
osf_upload(target_dir, path = ".", recurse = TRUE, conflicts = "overwrite", verbose = TRUE) 

Error message:

Uploading 577 new file(s) to OSF
Error: lexical error: invalid char in json text.
                                       Cannot complete action: file or
                     (right here) ------^ 

Using osfr to upload those folders definitely worked a couple of months ago. No clue what might have changed.

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