Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Clément Haëck
submeso-color
Commits
6f259004
Commit
6f259004
authored
Nov 24, 2021
by
Clément Haëck
Browse files
Print finder when no files are found
makes it instantaneous to debug the finder / fixes
parent
3eeb90cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
lib/data/__init__.py
lib/data/__init__.py
+2
-0
No files found.
lib/data/__init__.py
View file @
6f259004
...
...
@@ -56,6 +56,8 @@ def create_data(module, pregex, get_root, ARGS_DIR,
open_mf_kw_def
[
'preprocess'
]
=
finder
.
get_func_process_filename
(
open_mf_kw_def
.
pop
(
'preprocess_finder'
),
*
pp_args
,
**
pp_kw
)
if
len
(
finder
.
files
)
==
0
:
raise
RuntimeError
(
"No files found.
\n
{:s}"
.
format
(
str
(
finder
)))
ds
=
xr
.
open_mfdataset
(
finder
.
get_files
(),
**
open_mf_kw_def
)
return
ds
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment