popgenmethods / pyrho

Fast inference of fine-scale recombination rates based on fused-LASSO
MIT License
44 stars 6 forks source link

Error when setting --logfile #13

Closed lczech closed 4 years ago

lczech commented 4 years ago

When setting a --logfile, I get the following error message:

Traceback (most recent call last):
  File "[...]/pyrho/bin/pyrho", line 8, in <module>
    sys.exit(main())
  File "[...]/pyrho/frontend.py", line 66, in main
    logging.basicConfig(filename=args.log, level=50 - args.verbosity)
AttributeError: 'Namespace' object has no attribute 'log'

This occurs for all commands, for example when calling

pyrho compute_r2 --tablefile out/ACB.hdf --quantiles 0.25,0.5,0.75 \
--compute_mean --samplesize 20 --outfile out/ACB_r2.txt \
--logfile logs/compute_r2/ACB-int.log > logs/compute_r2/ACB-ext.log 2>&1

When leaving out the log file path, it works fine. Using Ubuntu 18.04.

jeffspence commented 4 years ago

Thanks for this. It should be fixed by 00c9bbb5d1a998911bffe32a3a84c12e3f84d42a . Let me know if it doesn't work for you.

lczech commented 4 years ago

Yep, that seems to have fixed it. Thanks for the awesomely quick response time!