ivmfnal / metacat

Metadata Catalog
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

Can't show metadata categories #40

Closed calcuttj closed 1 year ago

calcuttj commented 1 year ago

Attempting to explore what metadata can be queried against. Getting errors when trying to see the metadata categories

<html><body><h2>Application error</h2>
            <h3>object of type 'NoneType' has no len()</h3>
            <pre>
Traceback (most recent call last):
  File "/home/dbidata3/multiserver/webpie/webpie/WPApp.py", line 644, in wsgi_call
    response = root_handler._handle_request(request, "", path_down, args)
  File "/home/dbidata3/multiserver/webpie/webpie/WPApp.py", line 437, in _handle_request
    return subhandler._handle_request(request, path + "/" + word, path_down, args)
  File "/home/dbidata3/multiserver/webpie/webpie/WPApp.py", line 435, in _handle_request
    return subhandler(request, relpath, **args)
  File "./metacat_server_dune/server/common_handler.py", line 93, in decorated
    try:    out = method(*params, **agrs)
  File "./metacat_server_dune/server/data_handler.py", line 1475, in category
    cat = DBParamCategory.get(db, path)
  File "./metacat_server_dune/lib/metacat/common/dbbase.py", line 82, in get
    assert len(pkvalues) == len(cls.PK)
TypeError: object of type 'NoneType' has no len()
</pre>
            </body>
            </html>
workflow$ metacat category show DUNE
<html><body><h2>Application error</h2>
            <h3>object of type 'NoneType' has no len()</h3>
            <pre>
Traceback (most recent call last):
  File "/home/dbidata3/multiserver/webpie/webpie/WPApp.py", line 644, in wsgi_call
    response = root_handler._handle_request(request, "", path_down, args)
  File "/home/dbidata3/multiserver/webpie/webpie/WPApp.py", line 437, in _handle_request
    return subhandler._handle_request(request, path + "/" + word, path_down, args)
  File "/home/dbidata3/multiserver/webpie/webpie/WPApp.py", line 435, in _handle_request
    return subhandler(request, relpath, **args)
  File "./metacat_server_dune/server/common_handler.py", line 93, in decorated
    try:    out = method(*params, **agrs)
  File "./metacat_server_dune/server/data_handler.py", line 1475, in category
    cat = DBParamCategory.get(db, path)
  File "./metacat_server_dune/lib/metacat/common/dbbase.py", line 82, in get
    assert len(pkvalues) == len(cls.PK)
TypeError: object of type 'NoneType' has no len()
</pre>
            </body>
            </html>
workflow$ metacat category show core
<html><body><h2>Application error</h2>
            <h3>object of type 'NoneType' has no len()</h3>
            <pre>
Traceback (most recent call last):
  File "/home/dbidata3/multiserver/webpie/webpie/WPApp.py", line 644, in wsgi_call
    response = root_handler._handle_request(request, "", path_down, args)
  File "/home/dbidata3/multiserver/webpie/webpie/WPApp.py", line 437, in _handle_request
    return subhandler._handle_request(request, path + "/" + word, path_down, args)
  File "/home/dbidata3/multiserver/webpie/webpie/WPApp.py", line 435, in _handle_request
    return subhandler(request, relpath, **args)
  File "./metacat_server_dune/server/common_handler.py", line 93, in decorated
    try:    out = method(*params, **agrs)
  File "./metacat_server_dune/server/data_handler.py", line 1475, in category
    cat = DBParamCategory.get(db, path)
  File "./metacat_server_dune/lib/metacat/common/dbbase.py", line 82, in get
    assert len(pkvalues) == len(cls.PK)
TypeError: object of type 'NoneType' has no len()
</pre>
            </body>
            </html>
ahiguera-mx commented 1 year ago

I have encountered a similar issue. Here is a minimal example $ metacat category list $ metacat category show dune_mc

Application error

object of type 'NoneType' has no len()

Traceback (most recent call last):
  File "/home/dbidata3/multiserver/webpie/webpie/WPApp.py", line 644, in wsgi_call
    response = root_handler._handle_request(request, "", path_down, args)
  File "/home/dbidata3/multiserver/webpie/webpie/WPApp.py", line 437, in _handle_request
    return subhandler._handle_request(request, path + "/" + word, path_down, args)
  File "/home/dbidata3/multiserver/webpie/webpie/WPApp.py", line 435, in _handle_request
    return subhandler(request, relpath, **args)
  File "./metacat_server_dune/server/common_handler.py", line 93, in decorated
    try:    out = method(*params, **agrs)
  File "./metacat_server_dune/server/data_handler.py", line 1475, in category
    cat = DBParamCategory.get(db, path)
  File "./metacat_server_dune/lib/metacat/common/dbbase.py", line 82, in get
    assert len(pkvalues) == len(cls.PK)
TypeError: object of type 'NoneType' has no len()
` Server version: 3.42.0 Client version: 3.36.1
ivmfnal commented 1 year ago

Fixed that.