Skip to content

No :name key among storage attributes #5

@itafraze

Description

@itafraze

Call to

OSF.storage(proj, name)

gives ERROR: KeyError: key :name not found, triggered by

only(filter(s -> s.attributes[:name] == storage, storages))

[s.attributes for s ∈ OSF.API.relationship(client, proj.entity, :files).data] gives

2-element Vector{Dict{Symbol, Any}}:
 Dict(:kind => "folder", :provider => "osfstorage", :node => "qsabn", :path => "/", :name => "osfstorage")
 Dict(:kind => "folder", :provider => "dropbox", :node => "qsabn", :path => "/")

View-only OSF project link: https://osf.io/qsabn/overview?view_only=2a03b6c78ef14922a3e244f3d549de78

You can replicate it with:

import OpenScienceFramework as OSF

client = OSF.Client(view_only = "2a03b6c78ef14922a3e244f3d549de78")
proj = OSF.project(client, "qsabn")
OSF.directory(proj, "/")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions