matthiaskoenig / pkdb

Pharmacokinetics database
https://alpha.pk-db.com
30 stars 6 forks source link

Upload bug diazepam/Wang2020a and diazepam/Wang2020b #573

Closed matthiaskoenig closed 4 years ago

matthiaskoenig commented 4 years ago

I changed the name and the sid of two studies. This results in problems with uploads even if the study.json is correct. It seems like changing both name and sid leaves the database in an inconsistent state.

Seems like I have to purge the database to solve this.

upload_study -s studies/benzodiazepines/diazepam/Wang2020b
INFO --------------------------------------------------------------------------------
INFO Upload studies/benzodiazepines/diazepam/Wang2020b
INFO --------------------------------------------------------------------------------
INFO - 0.04 [s] : Created TSVs ['Tab6', 'Tab7', 'TabGroups', 'TabInterventions']
INFO {'reference_path': PosixPath('studies/benzodiazepines/diazepam/Wang2020b'), 'name': 'Wang2020b', 'pmid': 31965188}
WARNING 
{
  "date": [
    "This field is required."
  ]
}
INFO - 0.31 [s] : Upload references
INFO - 5.20 [s] : Upload files
WARNING 
{
  "Reference": "instance does not exist.",
  "detail": {
    "sid": "31965188"
  }
}
ERROR UPLOAD ERROR (check errors and warnings)
WARNING 
{
  "detail": "Not found."
}
matthiaskoenig commented 4 years ago

@janekg89 Can you have a look at this? This is very strange. Not uploading for me locally or on develop?

janekg89 commented 4 years ago

date field is required on reference in pkdb. Sometimes the field is not in the external resource, which is queried to create reference.json

janekg89 commented 4 years ago

resolved this by adding the date in reference manually

matthiaskoenig commented 4 years ago

Makes sense. It was unclear from the logs that this is on the reference.json and not on the study.json. I had the date field on the study.json and could not figure what was going on. Thx.