Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDF export error: capgrids TypeError #476

Open
jessesnyder opened this issue Mar 24, 2022 · 1 comment
Open

RDF export error: capgrids TypeError #476

jessesnyder opened this issue Mar 24, 2022 · 1 comment
Assignees
Labels

Comments

@jessesnyder
Copy link

jessesnyder commented Mar 24, 2022

Exception thrown while running weekly RDF export:

2022-03-24 12:59:40 ERROR pleiades.rdf Exception caught computing grid extent for <Location at /plone/places/442580/batlas-locati
on>
Traceback (most recent call last):
  File "/srv/python27-apps/pleiades4/src/pleiades.rdf/pleiades/rdf/common.py", line 589, in place
    shape = box(*bounds)
TypeError: box() takes at least 4 arguments (2 given)
2022-03-24 12:59:42 ERROR pleiades.rdf Exception caught computing grid extent for <Location at /plone/places/442602/batlas-locati
on>
Traceback (most recent call last):
  File "/srv/python27-apps/pleiades4/src/pleiades.rdf/pleiades/rdf/common.py", line 589, in place
    shape = box(*bounds)
TypeError: box() takes at least 4 arguments (2 given)
...
...
etc. (there are a bunch of these)

Same error, different call site (line 538):

2022-03-24 12:59:54 ERROR pleiades.rdf Exception caught computing grid extent for <Location at /plone/places/442848/batlas-locati
on>
Traceback (most recent call last):
  File "/srv/python27-apps/pleiades4/src/pleiades.rdf/pleiades/rdf/common.py", line 538, in place
    shape = box(*bounds)
TypeError: box() takes at least 4 arguments (2 given)
@jessesnyder
Copy link
Author

jessesnyder commented Mar 24, 2022

Traced this error to inconsistent return values from pleiades.capgrids.box() depending on the input values. Currently 3 of the "inset" maps defined in pleiades.capgrids.maps.csv have more than one set of bounding-box coordinates. For example, number 45:
45,"Tarentum",500,14.50,19.00,40.00,42.00,"a","I",1,4,"[[15,41.5,16,42.5], [17.5, 39.5, 40.5, 19]]","45 inset"

Compare this with number 30, which has a single bounding box:
30,"Iol Caesarea",500,0.50,4.50,36.00,38.00,"a","h",1,4,"[0,36,1.5,37]","30 inset"

This results in return a tuple of 2 tuples of 4, instead of the single tuple of 4 expected by shapely.box().

Current problematic maps are 45, 47, and 80.

@paregorios paregorios added this to the 2023-02 Ticket review milestone Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants