Closed georgiesamaha closed 11 months ago
I'm still getting this unfortunately :\
$ python3 configBuilder
/home/james/git/jfy133/configBuilder-nf/configBuilder:12: SyntaxWarning: invalid escape sequence '\|'
print(f"{Fore.CYAN}| | / _ \| '_ \| |_| |/ _` | _ \| | | | | |/ _` |/ _ \ '__|")
/home/james/git/jfy133/configBuilder-nf/configBuilder:14: SyntaxWarning: invalid escape sequence '\_'
print(f"{Fore.CYAN} \____\___/|_| |_|_| |_|\__, |____/ \__,_|_|_|\__,_|\___|_| ")
____ __ _ ____ _ _ _
/ ___|___ _ __ / _(_) __ _| __ ) _ _(_) | __| | ___ _ __
| | / _ \| '_ \| |_| |/ _` | _ \| | | | | |/ _` |/ _ \ '__|
| |__| (_) | | | | _| | (_| | |_) | |_| | | | (_| | __/ |
\____\___/|_| |_|_| |_|\__, |____/ \__,_|_|_|\__,_|\___|_|
|___/
This tool helps you to build a custom Nextflow config file for your HPC
based on your specified job scheduler and resources. Follow the prompts
to specify your settings.
[?] What type of configuration file would you like to build?: custom
> custom
nf-core institutional
[?] What type of execution environment are you working in?: hpc
> hpc
local
cloud
No modules system detected.
You selected: hpc
[?] What do you want your custom config file to be called?: custom_nextflow.config
Traceback (most recent call last):
File "/home/james/git/jfy133/configBuilder-nf/configBuilder", line 34, in <module>
custom_pipeline()
File "/home/james/git/jfy133/configBuilder-nf/modules/create_custom.py", line 49, in custom_pipeline
write_config(executor=scheduler_name, module_results=module_results)
File "/home/james/git/jfy133/configBuilder-nf/modules/write_config.py", line 20, in write_config
if module_results.get("singularity"):
^^^^^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'get'
@georgiesamaha your inference is right, just in the wrong place
The Booelan is passed out here as false
. When I replaced it with e.g. return {"not_detected": True}
then ti stopped erroring
@georgiesamaha your inference is right, just in the wrong place
The Booelan is passed out here as
false
. When I replaced it with e.g.return {"not_detected": True}
then ti stopped erroring
Oopsies! Ok have implemented your fix. Sorry about that!
Definitely, I don't want to slow you down :) Plus this is an us thing not a me thing!
Noted!
While running the configBuilder, encountered an AttributeError when the tool attempted to access the
get()
method on themodule_results
variable. Error trace indicated thatmodule_results
was treated as a boolean instead of a dictionary. Executed with:When no module detected, throws:
To fix, I've initialised
module_results=None
variable in thecustom_pipeline()
function increate_custom.py
to prevent the AttributeError.@jfy133 could you test this resolves your issue?