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 <1580498337.58.0.0606728460892.issue39513@roundup.psfhosted.org>
In-reply-to
Content
Hi 
   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/__init__.py", line 1013, in __del__
  File "/d01/python3/lib64/python3.6/site-packages/pysftp/__init__.py", line 785, in close
  File "/d01/python3/lib64/python3.6/site-packages/paramiko/sftp_client.py", line 194, in close
  File "/d01/python3/lib64/python3.6/site-packages/paramiko/sftp_client.py", line 185, in _log
  File "/d01/python3/lib64/python3.6/site-packages/paramiko/sftp.py", line 158, in _log
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/logging/__init__.py", line 1372, in log
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/logging/__init__.py", line 1442, in _log
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/logging/__init__.py", line 1452, in handle
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/logging/__init__.py", line 1514, in callHandlers
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/logging/__init__.py", line 863, in handle
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/logging/__init__.py", line 1069, in emit
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/logging/__init__.py", line 1059, in _open
NameError: name 'open' is not defined
History
Date User Action Args
2020-01-31 19:18:57Sandeepsetrecipients: + Sandeep
2020-01-31 19:18:57Sandeepsetmessageid: <1580498337.58.0.0606728460892.issue39513@roundup.psfhosted.org>
2020-01-31 19:18:57Sandeeplinkissue39513 messages
2020-01-31 19:18:57Sandeepcreate