Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Cannot use the biblio.csv metadata file due to keywords issue #118

Open
jimbrig opened this issue Jul 30, 2023 · 3 comments
Open

Bug: Cannot use the biblio.csv metadata file due to keywords issue #118

jimbrig opened this issue Jul 30, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@jimbrig
Copy link

jimbrig commented Jul 30, 2023

No description provided.

@amoeba
Copy link
Collaborator

amoeba commented Jul 31, 2023

Hi @jimbrig, can you give us a little more info here? What keywords issue are you running into?

@amoeba amoeba self-assigned this Jul 31, 2023
@amoeba amoeba added the bug Something isn't working label Jul 31, 2023
@kthayashi
Copy link

Hello - I'm not sure if this is exactly the same issue as @jimbrig experienced, but I also encountered an issue with keywords in the biblio.csv metadata file so wanted to chime in.

Here's what I did: I started by creating a rather minimal metadata file (say eml.xml) in EML format using the EML and EMLassemblyline packages. I confirmed that eml.xml is valid in EML, but perhaps notably this file does not contain any keyword info. I then converted this file into dataspice metadata tables using the function eml_to_spice(). When I then tried to use the function write_spice() on these tables, I received the error message:

> eml <- read_eml("eml.xml")
> my_spice <- eml_to_spice(eml, path = ".")
> write_spice(path = ".")  
Error in if (is.na(biblio$keywords)) { : argument is of length zero                                            
In addition: Warning message:
Unknown or uninitialised column: `keywords`. 

It appears that the table biblio.csv was lacking the expected column keywords. Here are the columns present in each of the metadata tables produced by write_spice():

> lapply(my_spice, names)
$attributes
[1] "fileName"     "variableName" "description"  "unitText"    

$access
[1] "fileName" "name"    

$biblio
[1] "title"         "datePublished" "license"      

$creators
[1] "id"          "name"        "affiliation" "email"   

For what it's worth, manually adding an empty keywords column to biblio.csv allowed me to avoid this issue and generate dataspice.json as expected.

@amoeba
Copy link
Collaborator

amoeba commented Aug 29, 2023

Thanks @kthayashi, that looks like enough info for me to reproduce the error on my end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants