priv-kweihmann / multimetric

Calculate code metrics in various languages
zlib License
36 stars 13 forks source link

Solution to the issue with multiprocessing AttributeError: Can't get attribute 'file_process' on <module '__main__' (built-in)> #57

Open LiangHsunChen opened 1 year ago

LiangHsunChen commented 1 year ago

image

Got this error and found a solution: Move file_process() to a different file then import it in main.py. Not sure if this issue happens to others. Just post this issue here for reference.

Reference to solution: stackoverflow

priv-kweihmann commented 9 months ago

@LiangHsunChen out of curiosity - how did you encounter the error? What code produced this behavior?

Neither calling the tool directly via CLI, nor by importing it into a 3rd party script gave me that kind of error