Reading log file error with Picket Fence


I’m new to pylinac and trying to read a log file with PicketFence. However I’m obtaining an error when trying to read a bin file.

My guess is that maybe the bin file is not appropiate or that maybe I should provide an expected map as well?

my_log = “/Users/oscarestradapastor/Desktop/Python Projects/mlc/DHX” is the directory containing the .bin file. Am I doing something wrong? Any ideas?



1 logs found.

Log loaded: 1 of 1

[<pylinac.log_analyzer.Dynalog object at 0x13756f450>]

pf = PicketFence(my_dcm, mlc = “HDMLC”, crop_mm = 90, filter = 10, log = my_log)


File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pylinac/”, line 243, in init


File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pylinac/”, line 452, in _load_log

fl = mlog.fluence.expected.calc_map(equal_aspect=True)


AttributeError: ‘MachineLogs’ object has no attribute ‘fluence’

Hi Oscar,

TLDR: This happened because the my_log was defined a directory name rather than the name of the logfile.

If you go deeper to check the error, the MachineLogs is a class representing an ensemble of logfiles in a directory and if you look at the source file
“” you can see that no fluence in the MachineLogs class. Instead you should provide the name of a logfile to the PickeFence initialization:

my_log = “~/log_directory/logname.bin”

pf = PicketFence(my_dcm, mlc=“HDMLC”, crop_mm = 90, filter=10, log=my_log)


If you want to some sort of batch analysis you can write simple iterations with os.path functions.

I am not sure if this is a bug or a feature remained to be implemented, which might be answered by James.

Hope this answered your question,