layout.get(..., extension=bids.layout.Query.ANY) fails
See original GitHub issuelayout.get
assumes that the extension
filter is a string or list of strings. We need to handle the Query
options, as well as None
.
~/Projects/bids-standard/pybids/bids/layout/layout.py in get(self, return_type, target, scope, regex_search, absolute_paths, drop_invalid_filters, **filters)
918 if 'extension' in filters:
919 exts = listify(filters['extension'])
--> 920 filters['extension'] = [x.lstrip('.') for x in exts]
921
922 if drop_invalid_filters:
~/Projects/bids-standard/pybids/bids/layout/layout.py in <listcomp>(.0)
918 if 'extension' in filters:
919 exts = listify(filters['extension'])
--> 920 filters['extension'] = [x.lstrip('.') for x in exts]
921
922 if drop_invalid_filters:
AttributeError: 'Query' object has no attribute 'lstrip'
Issue Analytics
- State:
- Created 3 years ago
- Comments:8
Top Results From Across the Web
How Many Hair Extensions Do You Need? - NuTress
When we get an enquiry from a new client who has had hair extensions before, we usually ask “Do you know how many...
Read more >BEEDS | Bank of England
Data submission. The Bank of England Electronic Data Submission (BEEDS) portal is an online application that manages formal regulatory and statistical data ...
Read more >Inverting the structure–property map of truss metamaterials by ...
We demonstrate the application to patient-specific bone implants matching clinical stiffness data, and we discuss the extension to spatially graded cellular ...
Read more >Untitled
PR Number Description Application Function
1955423 Cutter compensation produces fragmented arc CAM PLANAR_M...
1975413 Step Translation of surfaces makes discontinuities TRANSLATOR STEP_AP214
2223375 NX8.5 create the...
Read more >Cisco Unity Connection Provisioning Interface (CUPI) API
Configuring an HTML-Based Notification Template with an HTML ... GET http://<connection-server>/vmrest/users?query=(alias%20startswith%20ab).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is only failing because of a check intended to ensure backwards compatibility with people still using
extensions
instead ofextension
. We’re already issuing a warning thatextensions
goes away in 0.11, so I vote we just wait till 0.11 and this problem will go away by itself as soon as we remove the vestigial code.The use case was determining which entities were used by a dataset.
This failure required:
There might be smarter ways to go about this, but it seems silly for this to be the only entity that can’t take a
Query
.