I have written a python script to get permits information from State Website.
When i Archive my Layer i get the above mentioned error, Script works fine if i dont archive my layer not able to find a solution.
Attaching my script.