This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Sandeep
Recipients Sandeep
Date 2020-01-31.19:18:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
   I wrote a python script which gets file from other server and it works fine till the time I don't introduces logging feature to it. 
Please advice how to fix below

This is the code I am using for logging '

import logging
logging.basicConfig(filename=localLogfile, level=logging.DEBUG)

--Error Message 

Traceback (most recent call last):
  File "/d01/python3/lib64/python3.6/site-packages/pysftp/", line 1013, in __del__
  File "/d01/python3/lib64/python3.6/site-packages/pysftp/", line 785, in close
  File "/d01/python3/lib64/python3.6/site-packages/paramiko/", line 194, in close
  File "/d01/python3/lib64/python3.6/site-packages/paramiko/", line 185, in _log
  File "/d01/python3/lib64/python3.6/site-packages/paramiko/", line 158, in _log
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/logging/", line 1372, in log
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/logging/", line 1442, in _log
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/logging/", line 1452, in handle
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/logging/", line 1514, in callHandlers
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/logging/", line 863, in handle
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/logging/", line 1069, in emit
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/logging/", line 1059, in _open
NameError: name 'open' is not defined
Date User Action Args
2020-01-31 19:18:57Sandeepsetrecipients: + Sandeep
2020-01-31 19:18:57Sandeepsetmessageid: <>
2020-01-31 19:18:57Sandeeplinkissue39513 messages
2020-01-31 19:18:57Sandeepcreate