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

'GrapheneMeshMetadata' object has no attribute 'max_meshed_layer' #572

Open
schlegelp opened this issue Nov 29, 2022 · 6 comments
Open

'GrapheneMeshMetadata' object has no attribute 'max_meshed_layer' #572

schlegelp opened this issue Nov 29, 2022 · 6 comments
Labels
bug The code is not performing according to the design or a design flaw is seriously impacting users.

Comments

@schlegelp
Copy link

Hi Will, hope you're doing well!

@jefferis and I ran into an issue with the new version 8.16.0 when trying to fetch meshes for FlyWire.

Minimal examples:

>>> import cloudvolume as cv
>>> vol = cv.CloudVolume('graphene://https://prod.flywire-daf.com/segmentation/table/fly_v31')
>>> m = vol.mesh.get(720575940634786667)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In [6], line 1
----> 1 m = vol.mesh.get(720575940634786667)

File ~/.pyenv/versions/3.9.9/lib/python3.9/site-packages/cloudvolume/datasource/graphene/mesh/unsharded.py:213, in GrapheneUnshardedMeshSource.get(self, segids, remove_duplicate_vertices, fuse, bounding_box, bypass, use_byte_offsets, deduplicate_chunk_boundaries, allow_missing)
    211 level = meta.decode_layer_id(seg_id)
    212 try:
--> 213   mesh, is_draco = self.download_segid(
    214     seg_id, bounding_box, bypass, use_byte_offsets
    215   )
    216 except exceptions:
    217   continue

File ~/.pyenv/versions/3.9.9/lib/python3.9/site-packages/cloudvolume/datasource/graphene/mesh/unsharded.py:140, in GrapheneUnshardedMeshSource.download_segid(self, seg_id, bounding_box, bypass, use_byte_offsets)
    138 else:
    139   level = self.meta.meta.decode_layer_id(seg_id)
--> 140 fragment_filenames = self.get_fragment_filenames(
    141   seg_id, level=level, bbox=bounding_box, bypass=bypass
    142 )
    143 fragments = self._get_mesh_fragments({ fname: seg_id for fname in fragment_filenames })
    144 fragments = sorted(fragments, key=lambda frag: frag[0])  # make decoding deterministic

File ~/.pyenv/versions/3.9.9/lib/python3.9/site-packages/cloudvolume/datasource/graphene/mesh/unsharded.py:60, in GrapheneUnshardedMeshSource.get_fragment_filenames(self, segid, lod, level, bbox, bypass)
     57 if bypass:
     58   return [ self.compute_filename(segid) ]
---> 60 manifest = self.fetch_manifest(segid, lod, level, bbox, verify=True)
     61 return manifest["fragments"]

File ~/.pyenv/versions/3.9.9/lib/python3.9/site-packages/cloudvolume/datasource/graphene/mesh/unsharded.py:84, in GrapheneUnshardedMeshSource.fetch_manifest(self, segid, lod, level, bbox, return_segids, verify)
     81     else:
     82       return manifest
---> 84 manifest = self.fetch_manifest_remote(segid, lod, level, bbox, return_segids, verify)
     86 if self.cache.enabled and cacheable:
     87   self.cache.put_json(cache_path, manifest)

File ~/.pyenv/versions/3.9.9/lib/python3.9/site-packages/cloudvolume/datasource/graphene/mesh/unsharded.py:102, in GrapheneUnshardedMeshSource.fetch_manifest_remote(self, segid, lod, level, bbox, return_segids, verify)
     99   bbox = Bbox.create(bbox)
    100   query_d['bounds'] = bbox.to_filename()
--> 102 level = min(level, self.meta.max_meshed_layer)
    104 url = "%s/%s:%s" % (self.meta.meta.manifest_endpoint, segid, lod)
    105 if level is not None:

AttributeError: 'GrapheneMeshMetadata' object has no attribute 'max_meshed_layer'

I see that #569 or #567 might be related.

Best,

Philipp

@jefferis
Copy link

and #573

@william-silversmith
Copy link
Contributor

I'm testing #573 and it seems that there may be an additional level of issues as well. Once fixed, it results in IndexError: No mesh fragments found for segment 720575940634786667 when it does appear as a small mesh in Neuroglancer. Investigating.

@william-silversmith william-silversmith added the bug The code is not performing according to the design or a design flaw is seriously impacting users. label Nov 29, 2022
@william-silversmith
Copy link
Contributor

We may have a solution for this issue, but I'm asking one of our PCG experts to make sure it won't cause more problems.

@jasper-tms
Copy link

I'm experiencing this as well on cloudvolume 8.16.0 when trying to fetch meshes from FANC. Happens on both python3.9 and 3.10. I'm not sure if this is new information or not but the error doesn't occur for some meshes – I've tried two meshes, one small and one large, and I get the small mesh returned correctly with no error, but trying to fetch the large one gives me the error.

@william-silversmith
Copy link
Contributor

Hi guys, sorry this took so long! I released 8.17.0 which should contain a fix for the immediate issue. There appears to be an update needed for an early graphene server as well so it might not solve every problem. Nonetheless, please do let me know if this does the trick!

Thank you so much for your patience!

@jasper-tms
Copy link

Thanks Will! My case that was previously failing is now back to working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The code is not performing according to the design or a design flaw is seriously impacting users.
4 participants