I have faced the same attribute error while running and when checked with current working folder there are 2 filenames with logging. Delete those filenames or move to recycle bin or if imp move to different folder or change names for those logging files and run your program. It will work fine.