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

LORIS v26.0.0 - CouchDB_Import_Demographics.php error #9507

Closed
Johan-Peralta opened this issue Dec 11, 2024 · 4 comments
Closed

LORIS v26.0.0 - CouchDB_Import_Demographics.php error #9507

Johan-Peralta opened this issue Dec 11, 2024 · 4 comments

Comments

@Johan-Peralta
Copy link

Discussed in #9499

Originally posted by Johan-Peralta December 3, 2024
Hi, I am getting the following error when executing the CouchDB_Import_Demographics.php script on LORIS v26.0.0:

/var/www/loris/tools$ php CouchDB_Import_Demographics.php
Updating Config:BaseConfig: unchanged contentsDemographics_Session_HBN0000_VIS1: new
Demographics_Session_DCC0000_VIS1: new
PHP Fatal error:  Uncaught TypeError: Project::getProjectFromID(): Argument #1 ($projectID) must be of type ProjectID, int given, called in /var/www/loris/tools/CouchDB_Import_Demographics.php on line 380 and defined in /var/www/loris/php/libraries/Project.class.inc:105
Stack trace:
#0 /var/www/loris/tools/CouchDB_Import_Demographics.php(380): Project::getProjectFromID()
#1 /var/www/loris/tools/CouchDB_Import_Demographics.php(496): CouchDBDemographicsImporter->_updateDataDict()
#2 /var/www/loris/tools/CouchDB_Import_Demographics.php(512): CouchDBDemographicsImporter->run()
#3 {main}
  thrown in /var/www/loris/php/libraries/Project.class.inc on line 105

The projects seem to be properly setup in the MySQL side.
Any ideas on what could be causing the error?

Any help will be greatly appreciated, Johan

driusan pushed a commit to driusan/Loris that referenced this issue Dec 11, 2024
Fix type error in CouchDB_Import_Demographics script.

Resolves aces#9507
@driusan
Copy link
Collaborator

driusan commented Dec 11, 2024

I don't have a couchdb instance to test this on as v26 is moving towards the new SQL based dataquery tool, but #9508 should in theory fix the error that you posted. Can you test it and let me know?

@driusan
Copy link
Collaborator

driusan commented Dec 12, 2024

My mistake, the singleton method was added after the 26 release.

I've updated the PR to use "new" instead of singleton. Can you try it again? As I said, I don't have a CouchDB instance to test it on.

driusan added a commit that referenced this issue Dec 12, 2024
Fix type error in CouchDB_Import_Demographics script.

Resolves #9507
@driusan
Copy link
Collaborator

driusan commented Dec 12, 2024

Not sure why this wasn't auto-closed, the PR that fixes it was merged.

@driusan driusan closed this as completed Dec 12, 2024
@Johan-Peralta
Copy link
Author

Dave, thanks for your help resolving the script failure.

Best regards, Johan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants