Started by timer
Running as SYSTEM
Building remotely on Ubuntu_18.04_bioeng49 (buildslave Testing) in workspace /home/cmiss/Jenkins/workspace/SPARC-API-DEV
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
The recommended git tool is: NONE
No credentials specified
Cloning the remote Git repository
Cloning repository https://github.com/nih-sparc/sparc-api.git
> git init /home/cmiss/Jenkins/workspace/SPARC-API-DEV # timeout=10
Fetching upstream changes from https://github.com/nih-sparc/sparc-api.git
> git --version # timeout=10
> git --version # 'git version 2.25.1'
> git fetch --tags --force --progress -- https://github.com/nih-sparc/sparc-api.git +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url https://github.com/nih-sparc/sparc-api.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
Avoid second fetch
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
Checking out Revision 2bce0bd3e818359bebe9d7ec0402dbac84a8bf7d (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 2bce0bd3e818359bebe9d7ec0402dbac84a8bf7d # timeout=10
Commit message: "Merge pull request #270 from ignapas/monthly-send"
> git rev-list --no-walk 2bce0bd3e818359bebe9d7ec0402dbac84a8bf7d # timeout=10
[SPARC-API-DEV] $ /bin/bash /tmp/jenkins753657174104380638.sh
Requirement already satisfied: algoliasearch==2.6.2 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (2.6.2)
Requirement already satisfied: api==0.0.7 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 2)) (0.0.7)
Requirement already satisfied: APScheduler==3.7.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (3.7.0)
Requirement already satisfied: boto3==1.26 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 4)) (1.26.0)
Requirement already satisfied: botocore==1.29.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 5)) (1.29.0)
Requirement already satisfied: certifi==2023.5.7 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 6)) (2023.5.7)
Requirement already satisfied: chardet==3.0.4 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 7)) (3.0.4)
Collecting Click==7.1.2 (from -r requirements.txt (line 8))
Using cached click-7.1.2-py2.py3-none-any.whl.metadata (2.9 kB)
Requirement already satisfied: contentful==1.13.1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 9)) (1.13.1)
Requirement already satisfied: contentful_management==2.11.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 10)) (2.11.0)
Requirement already satisfied: docutils==0.15.2 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 11)) (0.15.2)
Requirement already satisfied: Flask==1.1.1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 12)) (1.1.1)
Requirement already satisfied: Flask-Caching==2.3.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 13)) (2.3.0)
Requirement already satisfied: Flask-Cors==3.0.8 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 14)) (3.0.8)
Requirement already satisfied: flask-marshmallow==0.10.1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 15)) (0.10.1)
Requirement already satisfied: google-api-python-client==2.52.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 16)) (2.52.0)
Requirement already satisfied: gunicorn==20.0.4 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 17)) (20.0.4)
Requirement already satisfied: hubspot-api-client==9.0.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 18)) (9.0.0)
Requirement already satisfied: idna==2.8 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 19)) (2.8)
Requirement already satisfied: itsdangerous==1.1.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 20)) (1.1.0)
Requirement already satisfied: Jinja2==2.11.3 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 21)) (2.11.3)
Requirement already satisfied: jmespath==0.9.4 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 22)) (0.9.4)
Requirement already satisfied: MarkupSafe==1.1.1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 23)) (1.1.1)
Requirement already satisfied: markdown==3.8 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 24)) (3.8)
Requirement already satisfied: marshmallow==3.2.2 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 25)) (3.2.2)
Requirement already satisfied: nose==1.3.7 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 26)) (1.3.7)
Requirement already satisfied: oauth2client==4.1.3 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 27)) (4.1.3)
Requirement already satisfied: osparc==0.4.3 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 28)) (0.4.3)
Requirement already satisfied: Pennsieve==6.1.1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 29)) (6.1.1)
Requirement already satisfied: Pennsieve2==0.1.2 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 30)) (0.1.2)
Requirement already satisfied: Pillow in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 31)) (11.2.1)
Requirement already satisfied: psycopg2-binary==2.9.10 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 32)) (2.9.10)
Requirement already satisfied: public==2019.4.13 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 33)) (2019.4.13)
Requirement already satisfied: pytest in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 34)) (8.3.5)
Requirement already satisfied: pymongo==3.8.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 35)) (3.8.0)
Requirement already satisfied: python-dateutil==2.8.2 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 36)) (2.8.2)
Requirement already satisfied: python-dotenv==0.10.3 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 37)) (0.10.3)
Requirement already satisfied: query-string==2019.4.13 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 38)) (2019.4.13)
Requirement already satisfied: requests==2.31.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 39)) (2.31.0)
Requirement already satisfied: s3transfer==0.6.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 40)) (0.6.0)
Requirement already satisfied: sendgrid==6.9.7 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 41)) (6.9.7)
Requirement already satisfied: six==1.13.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 42)) (1.13.0)
Requirement already satisfied: SQLAlchemy==2.0.40 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 43)) (2.0.40)
Requirement already satisfied: urllib3==1.26.4 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 44)) (1.26.4)
Requirement already satisfied: Werkzeug==0.16.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements.txt (line 45)) (0.16.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from requests==2.31.0->-r requirements.txt (line 39)) (3.4.2)
Requirement already satisfied: setuptools>=0.7 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from APScheduler==3.7.0->-r requirements.txt (line 3)) (80.3.1)
Requirement already satisfied: pytz in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from APScheduler==3.7.0->-r requirements.txt (line 3)) (2025.2)
Requirement already satisfied: tzlocal~=2.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from APScheduler==3.7.0->-r requirements.txt (line 3)) (2.1)
Requirement already satisfied: cachelib<0.10.0,>=0.9.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Flask-Caching==2.3.0->-r requirements.txt (line 13)) (0.9.0)
Requirement already satisfied: httplib2<1dev,>=0.15.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from google-api-python-client==2.52.0->-r requirements.txt (line 16)) (0.22.0)
Requirement already satisfied: google-auth<3.0.0dev,>=1.19.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from google-api-python-client==2.52.0->-r requirements.txt (line 16)) (2.40.0)
Requirement already satisfied: google-auth-httplib2>=0.1.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from google-api-python-client==2.52.0->-r requirements.txt (line 16)) (0.2.0)
Requirement already satisfied: google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from google-api-python-client==2.52.0->-r requirements.txt (line 16)) (2.25.0rc0)
Requirement already satisfied: uritemplate<5,>=3.0.1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from google-api-python-client==2.52.0->-r requirements.txt (line 16)) (4.1.1)
Requirement already satisfied: pyasn1>=0.1.7 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from oauth2client==4.1.3->-r requirements.txt (line 27)) (0.6.1)
Requirement already satisfied: pyasn1-modules>=0.0.5 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from oauth2client==4.1.3->-r requirements.txt (line 27)) (0.4.2)
Requirement already satisfied: rsa>=3.1.4 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from oauth2client==4.1.3->-r requirements.txt (line 27)) (4.0)
Requirement already satisfied: configparser>=3.5 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Pennsieve==6.1.1->-r requirements.txt (line 29)) (7.2.0)
Requirement already satisfied: deprecated>=1.2.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Pennsieve==6.1.1->-r requirements.txt (line 29)) (1.2.18)
Requirement already satisfied: future>=0.15.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Pennsieve==6.1.1->-r requirements.txt (line 29)) (1.0.0)
Requirement already satisfied: futures in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Pennsieve==6.1.1->-r requirements.txt (line 29)) (3.0.5)
Requirement already satisfied: protobuf>=3.2.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Pennsieve==6.1.1->-r requirements.txt (line 29)) (4.25.7)
Requirement already satisfied: python-jose==3.2.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Pennsieve==6.1.1->-r requirements.txt (line 29)) (3.2.0)
Requirement already satisfied: semver>=2.8.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Pennsieve==6.1.1->-r requirements.txt (line 29)) (3.0.4)
Requirement already satisfied: websocket-client>=0.57.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Pennsieve==6.1.1->-r requirements.txt (line 29)) (1.8.0)
Requirement already satisfied: docopt>=0.6 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Pennsieve==6.1.1->-r requirements.txt (line 29)) (0.6.2)
Requirement already satisfied: psutil>=5.4 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Pennsieve==6.1.1->-r requirements.txt (line 29)) (7.0.0)
Requirement already satisfied: grpcio<2.0,>=1.51 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Pennsieve2==0.1.2->-r requirements.txt (line 30)) (1.71.0)
Requirement already satisfied: grpcio_tools<2.0,>=1.51 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Pennsieve2==0.1.2->-r requirements.txt (line 30)) (1.62.3)
Requirement already satisfied: pyjwt<3.0,>=2.6 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Pennsieve2==0.1.2->-r requirements.txt (line 30)) (2.10.1)
Requirement already satisfied: tqdm<5.0,>=4.64 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from Pennsieve2==0.1.2->-r requirements.txt (line 30)) (4.67.1)
Requirement already satisfied: python-http-client>=3.2.1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from sendgrid==6.9.7->-r requirements.txt (line 41)) (3.3.7)
Requirement already satisfied: starkbank-ecdsa>=2.0.1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from sendgrid==6.9.7->-r requirements.txt (line 41)) (2.2.0)
Requirement already satisfied: greenlet>=1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from SQLAlchemy==2.0.40->-r requirements.txt (line 43)) (3.2.1)
Requirement already satisfied: typing-extensions>=4.6.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from SQLAlchemy==2.0.40->-r requirements.txt (line 43)) (4.13.2)
Requirement already satisfied: ecdsa<0.15 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from python-jose==3.2.0->Pennsieve==6.1.1->-r requirements.txt (line 29)) (0.14.1)
Requirement already satisfied: googleapis-common-protos<2.0.0,>=1.56.2 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-api-python-client==2.52.0->-r requirements.txt (line 16)) (1.70.0)
Requirement already satisfied: proto-plus<2.0.0,>=1.22.3 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-api-python-client==2.52.0->-r requirements.txt (line 16)) (1.26.1)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from google-auth<3.0.0dev,>=1.19.0->google-api-python-client==2.52.0->-r requirements.txt (line 16)) (5.5.2)
Requirement already satisfied: pyparsing!=3.0.0,!=3.0.1,!=3.0.2,!=3.0.3,<4,>=2.4.2 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from httplib2<1dev,>=0.15.0->google-api-python-client==2.52.0->-r requirements.txt (line 16)) (3.2.3)
Requirement already satisfied: exceptiongroup>=1.0.0rc8 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pytest->-r requirements.txt (line 34)) (1.2.2)
Requirement already satisfied: iniconfig in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pytest->-r requirements.txt (line 34)) (2.1.0)
Requirement already satisfied: packaging in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pytest->-r requirements.txt (line 34)) (25.0)
Requirement already satisfied: pluggy<2,>=1.5 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pytest->-r requirements.txt (line 34)) (1.6.0)
Requirement already satisfied: tomli>=1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pytest->-r requirements.txt (line 34)) (2.2.1)
Requirement already satisfied: wrapt<2,>=1.10 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from deprecated>=1.2.0->Pennsieve==6.1.1->-r requirements.txt (line 29)) (1.17.2)
Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Installing collected packages: Click
Attempting uninstall: Click
Found existing installation: click 8.2.1
Uninstalling click-8.2.1:
Successfully uninstalled click-8.2.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
black 25.1.0 requires click>=8.0.0, but you have click 7.1.2 which is incompatible.
Successfully installed Click-7.1.2
Collecting pytest==5.4.3 (from -r requirements-dev.txt (line 1))
Using cached pytest-5.4.3-py3-none-any.whl.metadata (7.3 kB)
Requirement already satisfied: pennsieve==6.1.1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements-dev.txt (line 2)) (6.1.1)
Requirement already satisfied: black in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements-dev.txt (line 3)) (25.1.0)
Requirement already satisfied: isort in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements-dev.txt (line 4)) (6.0.1)
Requirement already satisfied: nose in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements-dev.txt (line 5)) (1.3.7)
Requirement already satisfied: packaging in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from -r requirements-dev.txt (line 6)) (25.0)
Requirement already satisfied: py>=1.5.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pytest==5.4.3->-r requirements-dev.txt (line 1)) (1.11.0)
Requirement already satisfied: attrs>=17.4.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pytest==5.4.3->-r requirements-dev.txt (line 1)) (25.3.0)
Requirement already satisfied: more-itertools>=4.0.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pytest==5.4.3->-r requirements-dev.txt (line 1)) (10.7.0)
Collecting pluggy<1.0,>=0.12 (from pytest==5.4.3->-r requirements-dev.txt (line 1))
Using cached pluggy-0.13.1-py2.py3-none-any.whl.metadata (15 kB)
Requirement already satisfied: wcwidth in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pytest==5.4.3->-r requirements-dev.txt (line 1)) (0.2.13)
Requirement already satisfied: boto3 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.26.0)
Requirement already satisfied: configparser>=3.5 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (7.2.0)
Requirement already satisfied: deprecated>=1.2.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.2.18)
Requirement already satisfied: future>=0.15.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.0.0)
Requirement already satisfied: futures in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (3.0.5)
Requirement already satisfied: protobuf>=3.2.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (4.25.7)
Requirement already satisfied: python-jose==3.2.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (3.2.0)
Requirement already satisfied: pytz>=2016 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (2025.2)
Requirement already satisfied: requests>=2.18 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (2.31.0)
Requirement already satisfied: rsa==4.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (4.0)
Requirement already satisfied: semver>=2.8.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (3.0.4)
Requirement already satisfied: websocket-client>=0.57.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.8.0)
Requirement already satisfied: docopt>=0.6 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (0.6.2)
Requirement already satisfied: psutil>=5.4 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (7.0.0)
Requirement already satisfied: python-dateutil>=2.8.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (2.8.2)
Requirement already satisfied: six<2.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from python-jose==3.2.0->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.13.0)
Requirement already satisfied: ecdsa<0.15 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from python-jose==3.2.0->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (0.14.1)
Requirement already satisfied: pyasn1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from python-jose==3.2.0->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (0.6.1)
Collecting click>=8.0.0 (from black->-r requirements-dev.txt (line 3))
Using cached click-8.2.1-py3-none-any.whl.metadata (2.5 kB)
Requirement already satisfied: mypy-extensions>=0.4.3 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from black->-r requirements-dev.txt (line 3)) (1.1.0)
Requirement already satisfied: pathspec>=0.9.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from black->-r requirements-dev.txt (line 3)) (0.12.1)
Requirement already satisfied: platformdirs>=2 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from black->-r requirements-dev.txt (line 3)) (4.3.7)
Requirement already satisfied: tomli>=1.1.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from black->-r requirements-dev.txt (line 3)) (2.2.1)
Requirement already satisfied: typing-extensions>=4.0.1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from black->-r requirements-dev.txt (line 3)) (4.13.2)
Requirement already satisfied: wrapt<2,>=1.10 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from deprecated>=1.2.0->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.17.2)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from requests>=2.18->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (3.4.2)
Requirement already satisfied: idna<4,>=2.5 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from requests>=2.18->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (2.8)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from requests>=2.18->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.26.4)
Requirement already satisfied: certifi>=2017.4.17 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from requests>=2.18->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (2023.5.7)
Requirement already satisfied: botocore<1.30.0,>=1.29.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from boto3->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.29.0)
Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from boto3->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (0.9.4)
Requirement already satisfied: s3transfer<0.7.0,>=0.6.0 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from boto3->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (0.6.0)
Using cached pytest-5.4.3-py3-none-any.whl (248 kB)
Using cached pluggy-0.13.1-py2.py3-none-any.whl (18 kB)
Using cached click-8.2.1-py3-none-any.whl (102 kB)
Installing collected packages: pluggy, click, pytest
Attempting uninstall: pluggy
Found existing installation: pluggy 1.6.0
Uninstalling pluggy-1.6.0:
Successfully uninstalled pluggy-1.6.0
Attempting uninstall: click
Found existing installation: click 7.1.2
Uninstalling click-7.1.2:
Successfully uninstalled click-7.1.2
Attempting uninstall: pytest
Found existing installation: pytest 8.3.5
Uninstalling pytest-8.3.5:
Successfully uninstalled pytest-8.3.5
Successfully installed click-8.2.1 pluggy-0.13.1 pytest-5.4.3
Requirement already satisfied: pytest in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (5.4.3)
Collecting pytest
Using cached pytest-8.3.5-py3-none-any.whl.metadata (7.6 kB)
Requirement already satisfied: exceptiongroup>=1.0.0rc8 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pytest) (1.2.2)
Requirement already satisfied: iniconfig in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pytest) (2.1.0)
Requirement already satisfied: packaging in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pytest) (25.0)
Collecting pluggy<2,>=1.5 (from pytest)
Using cached pluggy-1.6.0-py3-none-any.whl.metadata (4.8 kB)
Requirement already satisfied: tomli>=1 in /home/cmiss/python3.10.venv/lib/python3.10/site-packages (from pytest) (2.2.1)
Using cached pytest-8.3.5-py3-none-any.whl (343 kB)
Using cached pluggy-1.6.0-py3-none-any.whl (20 kB)
Installing collected packages: pluggy, pytest
Attempting uninstall: pluggy
Found existing installation: pluggy 0.13.1
Uninstalling pluggy-0.13.1:
Successfully uninstalled pluggy-0.13.1
Attempting uninstall: pytest
Found existing installation: pytest 5.4.3
Uninstalling pytest-5.4.3:
Successfully uninstalled pytest-5.4.3
Successfully installed pluggy-1.6.0 pytest-8.3.5
============================= test session starts ==============================
platform linux -- Python 3.10.17, pytest-8.3.5, pluggy-1.6.0
rootdir: /home/cmiss/Jenkins/workspace/SPARC-API-DEV
collected 119 items
tests/test_api.py ...................F....... [ 22%]
tests/test_biolucida.py ............. [ 33%]
tests/test_dataset_info.py .s..ss..... [ 42%]
tests/test_health.py . [ 43%]
tests/test_monthly_stats.py ...F..... [ 51%]
tests/test_osparc.py .............. [ 63%]
tests/test_plot.py F [ 63%]
tests/test_pmr.py ......... [ 71%]
tests/test_scicrunch.py ..FFF.........F.FF..F....F.. [ 94%]
tests/test_segmentation_info.py .. [ 96%]
tests/test_thumbnails.py ... [ 99%]
tests/test_update_contentful_entries.py . [100%]
=================================== FAILURES ===================================
____________________ test_simulation_ui_file_old_s3_bucket _____________________
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
> return complexjson.loads(self.text, **kwargs)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:971:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
/usr/lib/python3.10/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f5bccb12e90>
s = '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n'
idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/usr/lib/python3.10/json/decoder.py:355: JSONDecodeError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_simulation_ui_file_old_s3_bucket(client):
> r = client.get('/simulation_ui_file/135')
tests/test_api.py:301:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../../python3.10.venv/lib/python3.10/site-packages/flask/testing.py:222: in open
return Client.open(
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:1995: in simulation_ui_file
results = process_results(dataset_search(create_pennsieve_identifier_query(identifier)))
app/main.py:738: in dataset_search
return response.json()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
return complexjson.loads(self.text, **kwargs)
except JSONDecodeError as e:
# Catch JSON-related errors and raise as requests.JSONDecodeError
# This aliases json.JSONDecodeError and simplejson.JSONDecodeError
> raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
E requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:975: JSONDecodeError
__________________________________ test_email __________________________________
def test_email(): # Note that this will send an email to the test_"email_recipient" provided at the top of this doc
> responses = ms.send_stats(test_data)
tests/test_monthly_stats.py:66:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
scripts/monthly_stats.py:108: in send_stats
responses = [self.send_logging_email(email_body)] # send last email as log if in debug mode
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <scripts.monthly_stats.MonthlyStats object at 0x7f5bc408ffd0>
message = ''
def send_logging_email(self, message):
try:
response = self.send_grid.sendgrid_email_with_unsubscribe_group(Config.METRICS_EMAIL_ADDRESS,
self.logging_address,
'SPARC monthly dataset download summary',
message)
if response.status_code == 202:
logging.info(f'Logging email sent successfully to {self.logging_address} (202)')
elif response.status_code == 403:
logging.error('Could not send sendgrid email because rate limit is hit (403)')
elif response.status_code == 401:
logging.error('Could not send sendgrid email. Sendgrid keys are likely incorrect (401)')
else:
logging.error(f'Unknown error. Status code: {response.status_code}')
except BaseException as err:
logging.error(err)
> return response
E UnboundLocalError: local variable 'response' referenced before assignment
scripts/monthly_stats.py:228: UnboundLocalError
------------------------------ Captured log call -------------------------------
ERROR root:monthly_stats.py:226 HTTP Error 400: Bad Request
________________________________ test_abi_plot _________________________________
self = <Response [500]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
> return complexjson.loads(self.text, **kwargs)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:971:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
/usr/lib/python3.10/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f5bccb12e90>
s = '<html>\r\n<head><title>500 Internal Server Error</title></head>\r\n<body>\r\n<center><h1>500 Internal Server Error</h1></center>\r\n<hr><center>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n'
idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/usr/lib/python3.10/json/decoder.py:355: JSONDecodeError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_abi_plot(client):
# Testing abi-plot with dataset 26
dataset_id = "26"
> r = client.get('/dataset_info/using_pennsieve_identifier', query_string={'identifier': dataset_id})
tests/test_plot.py:17:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../../python3.10.venv/lib/python3.10/site-packages/flask/testing.py:222: in open
return Client.open(
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:669: in get_dataset_info_pennsieve_identifier
return reform_dataset_results(dataset_search(query))
app/main.py:738: in dataset_search
return response.json()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [500]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
return complexjson.loads(self.text, **kwargs)
except JSONDecodeError as e:
# Catch JSON-related errors and raise as requests.JSONDecodeError
# This aliases json.JSONDecodeError and simplejson.JSONDecodeError
> raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
E requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:975: JSONDecodeError
__________________________ test_scicrunch_dataset_doi __________________________
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
> return complexjson.loads(self.text, **kwargs)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:971:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
/usr/lib/python3.10/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f5bccb12e90>
s = '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n'
idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/usr/lib/python3.10/json/decoder.py:355: JSONDecodeError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_scicrunch_dataset_doi(client):
# Testing with dataset 55
identifier = "55"
> run_doi_test = check_doi_status(client, identifier, '10.26275/pzek-91wx')
tests/test_scicrunch.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_scicrunch.py:53: in check_doi_status
r = client.get('/dataset_info/using_pennsieve_identifier', query_string={'identifier': dataset_id})
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../../python3.10.venv/lib/python3.10/site-packages/flask/testing.py:222: in open
return Client.open(
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:669: in get_dataset_info_pennsieve_identifier
return reform_dataset_results(dataset_search(query))
app/main.py:738: in dataset_search
return response.json()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
return complexjson.loads(self.text, **kwargs)
except JSONDecodeError as e:
# Catch JSON-related errors and raise as requests.JSONDecodeError
# This aliases json.JSONDecodeError and simplejson.JSONDecodeError
> raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
E requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:975: JSONDecodeError
_____________________ test_scicrunch_multiple_dataset_doi ______________________
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
> return complexjson.loads(self.text, **kwargs)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:971:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
/usr/lib/python3.10/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f5bccb12e90>
s = '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n'
idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/usr/lib/python3.10/json/decoder.py:355: JSONDecodeError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_scicrunch_multiple_dataset_doi(client):
# Testing with dataset 55 and 68
run_doi_test_1 = check_doi_status(client, "55", '10.26275/pzek-91wx')
run_doi_test_2 = check_doi_status(client, "68", '10.26275/4qvr-kwzq')
if run_doi_test_1 and run_doi_test_2:
> r = client.get('/dataset_info/using_multiple_dois/?dois=10.26275%2Fpzek-91wx&dois=10.26275%2F4qvr-kwzq')
tests/test_scicrunch.py:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../../python3.10.venv/lib/python3.10/site-packages/flask/testing.py:222: in open
return Client.open(
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:615: in get_dataset_info_dois
return process_results(dataset_search(query))
app/main.py:738: in dataset_search
return response.json()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
return complexjson.loads(self.text, **kwargs)
except JSONDecodeError as e:
# Catch JSON-related errors and raise as requests.JSONDecodeError
# This aliases json.JSONDecodeError and simplejson.JSONDecodeError
> raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
E requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:975: JSONDecodeError
_____________________ test_scicrunch_multiple_dataset_ids ______________________
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
> return complexjson.loads(self.text, **kwargs)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:971:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
/usr/lib/python3.10/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f5bccb12e90>
s = '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n'
idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/usr/lib/python3.10/json/decoder.py:355: JSONDecodeError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_scicrunch_multiple_dataset_ids(client):
# Testing with dataset 55 and 68
> r = client.get('/dataset_info/using_multiple_discoverIds/?discoverIds=55&discoverIds=68')
tests/test_scicrunch.py:102:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../../python3.10.venv/lib/python3.10/site-packages/flask/testing.py:222: in open
return Client.open(
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:634: in get_dataset_info_discoverIds
return process_results(dataset_search(query))
app/main.py:738: in dataset_search
return response.json()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
return complexjson.loads(self.text, **kwargs)
except JSONDecodeError as e:
# Catch JSON-related errors and raise as requests.JSONDecodeError
# This aliases json.JSONDecodeError and simplejson.JSONDecodeError
> raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
E requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:975: JSONDecodeError
_________________________ test_create_identifier_query _________________________
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
> return complexjson.loads(self.text, **kwargs)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:971:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
/usr/lib/python3.10/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f5bccb12e90>
s = '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n'
idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/usr/lib/python3.10/json/decoder.py:355: JSONDecodeError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_create_identifier_query(client):
> r = client.get('/dataset_info/using_object_identifier?identifier=package:e6435710-dd9c-46b7-9dfd-932103469733')
tests/test_scicrunch.py:159:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../../python3.10.venv/lib/python3.10/site-packages/flask/testing.py:222: in open
return Client.open(
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:650: in get_dataset_info_object_identifier
return reform_dataset_results(dataset_search(query))
app/main.py:738: in dataset_search
return response.json()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
return complexjson.loads(self.text, **kwargs)
except JSONDecodeError as e:
# Catch JSON-related errors and raise as requests.JSONDecodeError
# This aliases json.JSONDecodeError and simplejson.JSONDecodeError
> raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
E requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:975: JSONDecodeError
____________________________ test_response_version _____________________________
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
> return complexjson.loads(self.text, **kwargs)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:971:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
/usr/lib/python3.10/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f5bccb12e90>
s = '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n'
idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/usr/lib/python3.10/json/decoder.py:355: JSONDecodeError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_response_version(client):
# Testing with dataset 44
identifier = "44"
doi = "10.26275/duz8-mq3n"
run_doi_test = check_doi_status(client, identifier, doi)
if run_doi_test:
> r = client.get('/dataset_info/using_doi', query_string={'doi': doi})
tests/test_scicrunch.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../../python3.10.venv/lib/python3.10/site-packages/flask/testing.py:222: in open
return Client.open(
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:604: in get_dataset_info_doi
return reform_dataset_results(dataset_search(query))
app/main.py:738: in dataset_search
return response.json()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
return complexjson.loads(self.text, **kwargs)
except JSONDecodeError as e:
# Catch JSON-related errors and raise as requests.JSONDecodeError
# This aliases json.JSONDecodeError and simplejson.JSONDecodeError
> raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
E requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:975: JSONDecodeError
____________________________ test_response_abi_plot ____________________________
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
> return complexjson.loads(self.text, **kwargs)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:971:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
/usr/lib/python3.10/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f5bccb12e90>
s = '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n'
idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/usr/lib/python3.10/json/decoder.py:355: JSONDecodeError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_response_abi_plot(client):
# Testing abi-plot with dataset 212
identifier = "212"
doi = "10.26275/lok5-wje6"
> run_doi_test = check_doi_status(client, identifier, doi)
tests/test_scicrunch.py:221:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_scicrunch.py:53: in check_doi_status
r = client.get('/dataset_info/using_pennsieve_identifier', query_string={'identifier': dataset_id})
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../../python3.10.venv/lib/python3.10/site-packages/flask/testing.py:222: in open
return Client.open(
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:669: in get_dataset_info_pennsieve_identifier
return reform_dataset_results(dataset_search(query))
app/main.py:738: in dataset_search
return response.json()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
return complexjson.loads(self.text, **kwargs)
except JSONDecodeError as e:
# Catch JSON-related errors and raise as requests.JSONDecodeError
# This aliases json.JSONDecodeError and simplejson.JSONDecodeError
> raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
E requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:975: JSONDecodeError
_________________________ test_raw_response_structure __________________________
self = <Response [500]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
> return complexjson.loads(self.text, **kwargs)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:971:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
/usr/lib/python3.10/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f5bccb12e90>
s = '<html>\r\n<head><title>500 Internal Server Error</title></head>\r\n<body>\r\n<center><h1>500 Internal Server Error</h1></center>\r\n<hr><center>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n'
idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/usr/lib/python3.10/json/decoder.py:355: JSONDecodeError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_raw_response_structure(client):
# 10.26275/zdxd-84xz
# 10.26275/duz8-mq3n
query = create_query_string("computational")
> data = dataset_search(query)
tests/test_scicrunch.py:428:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
app/main.py:738: in dataset_search
return response.json()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [500]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
return complexjson.loads(self.text, **kwargs)
except JSONDecodeError as e:
# Catch JSON-related errors and raise as requests.JSONDecodeError
# This aliases json.JSONDecodeError and simplejson.JSONDecodeError
> raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
E requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:975: JSONDecodeError
_____________________ test_finding_contextual_information ______________________
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
> return complexjson.loads(self.text, **kwargs)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:971:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
/usr/lib/python3.10/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f5bccb12e90>
s = '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.16.1</center>\r\n</body>\r\n</html>\r\n'
idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/usr/lib/python3.10/json/decoder.py:355: JSONDecodeError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_finding_contextual_information(client):
> r = client.get('/dataset_info/using_multiple_discoverIds/?discoverIds=76')
tests/test_scicrunch.py:514:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../../python3.10.venv/lib/python3.10/site-packages/flask/testing.py:222: in open
return Client.open(
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../../python3.10.venv/lib/python3.10/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../../python3.10.venv/lib/python3.10/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../../python3.10.venv/lib/python3.10/site-packages/flask/_compat.py:39: in reraise
raise value
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../../python3.10.venv/lib/python3.10/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:634: in get_dataset_info_discoverIds
return process_results(dataset_search(query))
app/main.py:738: in dataset_search
return response.json()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [502]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
return complexjson.loads(self.text, **kwargs)
except JSONDecodeError as e:
# Catch JSON-related errors and raise as requests.JSONDecodeError
# This aliases json.JSONDecodeError and simplejson.JSONDecodeError
> raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
E requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
../../../python3.10.venv/lib/python3.10/site-packages/requests/models.py:975: JSONDecodeError
=============================== warnings summary ===============================
scripts/monthly_db.py:9
/home/cmiss/Jenkins/workspace/SPARC-API-DEV/scripts/monthly_db.py:9: MovedIn20Warning: The ``declarative_base()`` function is now available as sqlalchemy.orm.declarative_base(). (deprecated since: 2.0) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
base = declarative_base()
../../../python3.10.venv/lib/python3.10/site-packages/apscheduler/__init__.py:1
/home/cmiss/python3.10.venv/lib/python3.10/site-packages/apscheduler/__init__.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import get_distribution, DistributionNotFound
../../../python3.10.venv/lib/python3.10/site-packages/marshmallow/__init__.py:17
/home/cmiss/python3.10.venv/lib/python3.10/site-packages/marshmallow/__init__.py:17: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
__version_info__ = tuple(LooseVersion(__version__).version)
../../../python3.10.venv/lib/python3.10/site-packages/flask_marshmallow/__init__.py:34
/home/cmiss/python3.10.venv/lib/python3.10/site-packages/flask_marshmallow/__init__.py:34: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
__version_info__ = tuple(LooseVersion(__version__).version)
../../../python3.10.venv/lib/python3.10/site-packages/pennsieve/cache/cache_segment_pb2.py:19
/home/cmiss/python3.10.venv/lib/python3.10/site-packages/pennsieve/cache/cache_segment_pb2.py:19: DeprecationWarning: Call to deprecated create function FileDescriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
DESCRIPTOR = _descriptor.FileDescriptor(
../../../python3.10.venv/lib/python3.10/site-packages/pennsieve/cache/cache_segment_pb2.py:36
/home/cmiss/python3.10.venv/lib/python3.10/site-packages/pennsieve/cache/cache_segment_pb2.py:36: DeprecationWarning: Call to deprecated create function FieldDescriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
_descriptor.FieldDescriptor(
../../../python3.10.venv/lib/python3.10/site-packages/pennsieve/cache/cache_segment_pb2.py:53
/home/cmiss/python3.10.venv/lib/python3.10/site-packages/pennsieve/cache/cache_segment_pb2.py:53: DeprecationWarning: Call to deprecated create function FieldDescriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
_descriptor.FieldDescriptor(
../../../python3.10.venv/lib/python3.10/site-packages/pennsieve/cache/cache_segment_pb2.py:70
/home/cmiss/python3.10.venv/lib/python3.10/site-packages/pennsieve/cache/cache_segment_pb2.py:70: DeprecationWarning: Call to deprecated create function FieldDescriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
_descriptor.FieldDescriptor(
../../../python3.10.venv/lib/python3.10/site-packages/pennsieve/cache/cache_segment_pb2.py:29
/home/cmiss/python3.10.venv/lib/python3.10/site-packages/pennsieve/cache/cache_segment_pb2.py:29: DeprecationWarning: Call to deprecated create function Descriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
_CACHESEGMENT = _descriptor.Descriptor(
app/dbtable.py:12
/home/cmiss/Jenkins/workspace/SPARC-API-DEV/app/dbtable.py:12: MovedIn20Warning: The ``declarative_base()`` function is now available as sqlalchemy.orm.declarative_base(). (deprecated since: 2.0) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
base = declarative_base()
../../../python3.10.venv/lib/python3.10/site-packages/urllib3/util/ssl_.py:281: 2 warnings
tests/test_api.py: 25 warnings
tests/test_biolucida.py: 13 warnings
tests/test_dataset_info.py: 6 warnings
tests/test_monthly_stats.py: 11 warnings
tests/test_osparc.py: 16 warnings
tests/test_plot.py: 1 warning
tests/test_pmr.py: 4 warnings
tests/test_scicrunch.py: 32 warnings
tests/test_thumbnails.py: 2 warnings
/home/cmiss/python3.10.venv/lib/python3.10/site-packages/urllib3/util/ssl_.py:281: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
context = SSLContext(ssl_version or PROTOCOL_TLS)
../../../python3.10.venv/lib/python3.10/site-packages/urllib3/connection.py:512: 2 warnings
tests/test_api.py: 29 warnings
tests/test_biolucida.py: 13 warnings
tests/test_dataset_info.py: 7 warnings
tests/test_monthly_stats.py: 14 warnings
tests/test_osparc.py: 16 warnings
tests/test_plot.py: 1 warning
tests/test_pmr.py: 4 warnings
tests/test_scicrunch.py: 33 warnings
tests/test_segmentation_info.py: 1 warning
tests/test_thumbnails.py: 2 warnings
/home/cmiss/python3.10.venv/lib/python3.10/site-packages/urllib3/connection.py:512: DeprecationWarning: ssl.match_hostname() is deprecated
match_hostname(cert, asserted_hostname)
../../../python3.10.venv/lib/python3.10/site-packages/nose/importer.py:12
/home/cmiss/python3.10.venv/lib/python3.10/site-packages/nose/importer.py:12: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
from imp import find_module, load_module, acquire_lock, release_lock
tests/test_health.py::test_request_response
/home/cmiss/Jenkins/workspace/SPARC-API-DEV/tests/test_health.py:13: DeprecationWarning: Please use assertEqual instead.
assert_equals("healthy", json_response.get("status"))
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_api.py::test_simulation_ui_file_old_s3_bucket - requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
FAILED tests/test_monthly_stats.py::test_email - UnboundLocalError: local variable 'response' referenced before assignment
FAILED tests/test_plot.py::test_abi_plot - requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
FAILED tests/test_scicrunch.py::test_scicrunch_dataset_doi - requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
FAILED tests/test_scicrunch.py::test_scicrunch_multiple_dataset_doi - requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
FAILED tests/test_scicrunch.py::test_scicrunch_multiple_dataset_ids - requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
FAILED tests/test_scicrunch.py::test_create_identifier_query - requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
FAILED tests/test_scicrunch.py::test_response_version - requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
FAILED tests/test_scicrunch.py::test_response_abi_plot - requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
FAILED tests/test_scicrunch.py::test_raw_response_structure - requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
FAILED tests/test_scicrunch.py::test_finding_contextual_information - requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
===== 11 failed, 105 passed, 3 skipped, 246 warnings in 2989.53s (0:49:49) =====
Build step 'Execute shell' marked build as failure
[Slack Notifications] found #1271 as previous completed, non-aborted build
[Slack Notifications] will send OnEveryFailureNotification because build matches and user preferences allow it
Finished: FAILURE