Skip to content

ORSO Structure testing from other libraries #155

@aglavic

Description

@aglavic

This is tripping me up again in:
https://github.com/refnx/refnx/actions/runs/23571406657/job/68634577362?pr=877

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.14.3/x64/lib/python3.14/site-packages/refnx/reflect/structure.py:891: in from_orso
    layers = sample_model.resolve_to_layers()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.14.3/x64/lib/python3.14/site-packages/orsopy/fileio/model_language.py:364: in resolve_to_layers
    sub_layers = obj.resolve_to_layers()
                 ^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.14.3/x64/lib/python3.14/site-packages/orsopy/fileio/model_language.py:181: in resolve_to_layers
    layers[i + added].material.generate_density()
/opt/hostedtoolcache/Python/3.14.3/x64/lib/python3.14/site-packages/orsopy/fileio/model_building_blocks.py:95: in generate_density
    dens = ri.resolve_formula(formula)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.14.3/x64/lib/python3.14/site-packages/orsopy/utils/resolver_slddb.py:43: in resolve_formula
    res = api.search(formula=formula)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.14.3/x64/lib/python3.14/site-packages/orsopy/slddb/webapi.py:116: in search
    self.check()
/opt/hostedtoolcache/Python/3.14.3/x64/lib/python3.14/site-packages/orsopy/slddb/webapi.py:60: in check
    self.download_db()
/opt/hostedtoolcache/Python/3.14.3/x64/lib/python3.14/site-packages/orsopy/slddb/webapi.py:80: in download_db
    res = request.urlopen(WEBAPI_URL + self.db_suburl, context=context)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.14.3/x64/lib/python3.14/urllib/request.py:187: in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.14.3/x64/lib/python3.14/urllib/request.py:493: in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.14.3/x64/lib/python3.14/urllib/request.py:602: in http_response
    response = self.parent.error(
/opt/hostedtoolcache/Python/3.14.3/x64/lib/python3.14/urllib/request.py:531: in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.14.3/x64/lib/python3.14/urllib/request.py:464: in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <urllib.request.HTTPDefaultErrorHandler object at 0x7f9830a1aad0>
req = <urllib.request.Request object at 0x7f983091fc50>
fp = <http.client.HTTPResponse object at 0x7f98308e0c40>, code = 404
msg = 'NOT FOUND', hdrs = <http.client.HTTPMessage object at 0x7f9830448a70>
    def http_error_default(self, req, fp, code, msg, hdrs):
      raise HTTPError(req.full_url, code, msg, hdrs, fp)
E       urllib.error.HTTPError: HTTP Error 404: NOT FOUND
/opt/hostedtoolcache/Python/3.14.3/x64/lib/python3.14/urllib/request.py:611: HTTPError
============================= slowest 10 durations =============================

CI is failing with a 404 error. However, I can carry out the request.urlopen locally.

Originally posted by @andyfaff in #142

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions