ocean.py: ocean.py marketplace quickstart fails

In marketplace quickstart, the line asset = ocean.assets.create(metadata...) fails.

I copied the python code into a file play.py and ran that. Here’s the py file.

Here’s the traceback:

(venv) trentmc@trentmcLnv:~$ python play.py 
publish datatoken: begin
publish datatoken: done
Traceback (most recent call last):
  File "/home/trentmc/venv/lib/python3.6/site-packages/ocean_utils/aquarius/aquarius.py", line 70, in list_assets
    asset_list = json.loads(response)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "play.py", line 52, in <module>
    asset = ocean.assets.create(metadata, alice_wallet, service_descriptors=[download_service], data_token_address=token_address)
  File "/home/trentmc/venv/lib/python3.6/site-packages/ocean_lib/ocean/ocean_assets.py", line 190, in create
    if did in self._get_aquarius().list_assets():
  File "/home/trentmc/venv/lib/python3.6/site-packages/ocean_utils/aquarius/aquarius.py", line 74, in list_assets
    raise ValueError(response.decode('UTF-8'))
ValueError: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 22 (17 by maintainers)

Most upvoted comments

I was able to replicate your error, @surajsjain.

I fixed that error with this PR: https://github.com/oceanprotocol/ocean.py/pull/97

Notes:

  • originally the service had url aquarius.rinkeby.v3.dev-ocean.com (and similar for provider)
  • then we created the service aquarius.rinkeby.oceanprotocol.com, quite a while ago now. That’s the ones we’ve been maintaining. The READMEs etc were not updated at the time. The old services at dev-ocean were / are still running.
  • #93 was to update the READMEs etc. Done. Except the wrong new url was provided: it had the v3 in it, and it shouldn’t have.
  • The PR fixes that problem.