Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

{"errors":[{"status":"422","title":"found unpermitted parameter: :volume"}]} #8

Closed
pdurbin opened this issue Jan 31, 2019 · 4 comments

Comments

@pdurbin
Copy link
Contributor

pdurbin commented Jan 31, 2019

@sfisher you're going to hate me but I didn't test pull request #5 with the DataCite hub. Now I'm getting "found unpermitted parameter: :volume" when I try to send my report.

Here's how the error looks:

{
  "errors": [
    {
      "status": "422",
      "title": "found unpermitted parameter: :volume"
    }
  ]
}

Here's the command I'm using curl --header "Content-Type: application/json; Accept: application/json" -H "Authorization: Bearer $JSON_WEB_TOKEN" -X POST https://api.test.datacite.org/reports/ -d @src/test/java/edu/harvard/iq/dataverse/makedatacount/sushi_sample_logs3.json

That sushi_sample_logs3.json report can be found at IQSS/dataverse@36fa81a

It looks like you already reported this at datacite/sashimi#23

We should revert my pull request, right? Or add a boolean so we can turn on and off the sending of volume?

@sfisher
Copy link
Contributor

sfisher commented Jan 31, 2019

Hi there.

I made some changes and a push to the repository. This is also in the non-daily-logs branch. See if that does what you need and let me know.

You'll need to set "output_volume: false" in the yml config file and then if you want volume, set an environment variable for OUTPUT_VOLUME to true. (or the opposite way around.)

For example:

YEAR_MONTH=2019-01 UPLOAD_TO_HUB=False OUTPUT_VOLUME=true ./main.py

For a while I had a flag for "only output stats" or something like that and that wouldn't suck in any log files at all and would just work with whatever was already in the sqlite database. Looks like I probably should bring it back.

It actually always calculates volume, but it just wasn't outputting it.

@pdurbin
Copy link
Contributor Author

pdurbin commented Feb 1, 2019

@sfisher I just looked at e550b77 and it seems to be exactly what we need. Thanks! Are you planning merging it to master and cutting a release?

pdurbin added a commit to IQSS/dataverse that referenced this issue Feb 1, 2019
@pdurbin
Copy link
Contributor Author

pdurbin commented Feb 1, 2019

@sfisher on second thought, while the OUTPUT_VOLUME boolean in e550b77 is helpful (and exactly what I asked for above!) what we really want is two versions of the JSON report. The idea is that the version without the volume will be sent to the DataCite hub until datacite/sashimi#23 is resolved. The version with the volume would be taken into Dataverse but only after we get some resolution on the "country-volume" idea at datacite/sashimi#23 (comment) (which might require a CoP change?!? see https://twitter.com/philipdurbin/status/1091344788568330240 ).

Bottom line, the boolean alone won't help us we'll probably run Counter Processor 0.0.1 so we can use it with the DataCite hub. So please don't feel any pressure from me to put out another release! Thanks!

@sfisher
Copy link
Contributor

sfisher commented Mar 19, 2024

I'm going to close this since I think it's resolved and the volume: False flag I believe allows it up upload to the DataCite hub.

@sfisher sfisher closed this as completed Mar 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants