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: update_readme fails when multiple readmes and multiple deposit agreements exist #275

Open
1 task done
zoidy opened this issue Dec 2, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@zoidy
Copy link
Collaborator

zoidy commented Dec 2, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

update_readme fails for items which have multiple responses for the readme form and deposit agreement. Possibly related to #244

Steps To Reproduce

Some Javascript

Perform an update_readme command for 26781733 observe the error below

16:52:49 -     INFO: *********************************
16:52:49 -     INFO: Started update_readme script ...
16:52:49 -     INFO: Config file: /home/curator/codes/LD_Cool_P/ldcoolp/config/arizona.ini
16:52:49 -     INFO: Number of Deposits: 1
16:52:49 -     INFO: Updating README.txt for : 26781733 ...
16:52:51 -     INFO: Retrieving depositor_name for 26781733 ...
16:52:52 -     INFO:   Depositor == author
16:52:52 -     INFO: depository_name : xxxxxx_26781733/v01
16:52:52 -     INFO:
16:52:52 -     INFO: ** UPDATING README.txt **
16:52:52 -     INFO: Current stage: 3.Reviewed
16:52:52 -     INFO: Stripping footer
16:52:52 -     INFO:
16:52:52 -     INFO: ** IDENTIFYING README FORM RESPONSE **
16:52:56 -     INFO: Attempting to identify using article_id or curation_id ...
16:52:56 -     INFO: Unique match based on article_id or curation_id !
|     | ResponseId        | SurveyID           |   article_id |   curation_id |
|----:|:------------------|:-------------------|-------------:|--------------:|
| 206 | R_1PvCFlNYHbRYDT2 | SV_cGw0O7Csy4XPmXX |     26781733 |       3323602 |
| 208 | R_6KjAWayvLt1YfS3 | SV_cGw0O7Csy4XPmXX |     26781733 |       3429447 |
| 209 | R_11BiHkHTCS1Sgsg | SV_cGw0O7Csy4XPmXX |     26781733 |       3429447 |
16:52:56 -  WARNING: Multiple entries found
16:52:56 -  WARNING: Error with retrieving ResponseId
16:52:56 -     INFO: PROMPT: If you wish, you can manually enter ResponseId to retrieve.
PROMPT: An EMPTY RETURN will generate a custom Qualtrics link to provide ... R_11BiHkHTCS1Sgsg
16:53:11 -     INFO: RESPONSE: R_11BiHkHTCS1Sgsg
16:53:14 -     INFO: Match found with R_11BiHkHTCS1Sgsg
16:53:14 -     INFO: Appending Deposit Agreement's Corresponding Author metadata
16:53:14 -     INFO: NO METADATA - Retrieving Deposit Agreement metadata
16:53:22 -     INFO: Attempting to identify using article_id or curation_id ...
16:53:22 -     INFO: Unique match based on article_id or curation_id !
16:53:22 -  WARNING: More than one entries found !!!
16:53:22 -  WARNING: Multiple entries found
|     | ResponseId        | SurveyID           | Q4_1        |   Q5 | Q6_1        | Q7     |
|----:|:------------------|:-------------------|:------------|-----:|:------------|:-------|
| 208 | R_3jsRZBK3Eg94xxv | SV_39rs7lHGLUYFK7P | xxxxxx |    2 | yyyyyyy | NanoRL |
| 210 | R_7ktjKoUUmQoIXTP | SV_39rs7lHGLUYFK7P | xxxxxxx |    2 | yyyyyy | NanoRL |
Traceback (most recent call last):
  File "/home/curator/codes/LD_Cool_P//ldcoolp/scripts/update_readme", line 101, in <module>
    log=log)
  File "/home/curator/codes/LD_Cool_P/ldcoolp/curation/inspection/readme/__init__.py", line 161, in __init__
    self.qualtrics_readme_dict = self.retrieve_qualtrics_readme()
  File "/home/curator/codes/LD_Cool_P/ldcoolp/curation/inspection/readme/__init__.py", line 379, in retrieve_qualtrics_readme
    readme_dict = self.q.retrieve_qualtrics_readme(self.dn)
  File "/home/curator/codes/LD_Cool_P/ldcoolp/curation/api/qualtrics.py", line 606, in retrieve_qualtrics_readme
    self.find_deposit_agreement(dn)
  File "/home/curator/codes/LD_Cool_P/ldcoolp/curation/api/qualtrics.py", line 322, in find_deposit_agreement
    raise ValueError
ValueError
@zoidy zoidy added the bug Something isn't working label Dec 2, 2024
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

1 participant