[issue39513] NameError: name 'open' is not defined
Change by Sandeep : -- components: Library (Lib) nosy: Sandeep priority: normal severity: normal status: open title: NameError: name 'open' is not defined type: crash versions: Python 3.6 ___ Python tracker <https://bugs.python.org/issue39513> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39513] NameError: name 'open' is not defined
New submission from Sandeep : 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 -- status: open -> pending ___ Python tracker <https://bugs.python.org/issue39513> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26789] Please do not log during shutdown
Sandeep added the comment: I did import aiohttp and called function sys.is_finalizing() just before logging.basicConfig but still the same error. Has logging.basicConfig worked in past ? If yes what additional package I need to add Thanks -- nosy: +Sandeep ___ Python tracker <https://bugs.python.org/issue26789> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39928] Pysftp Issue File Upload is not working - put command
New submission from Sandeep : Hi We have requirement where we need to get file from client path and then upload the same to vendor directory path. I am not able to upload the file to vendor directory path , however when I tried to use the WINSCP it worked fine. So I thought of checking with Gurus what is wrong I am doing in my script. Appreciate your input. I will attach my script. Here is what I am doing. Step1. Clear the client directory path Step2. Make a call to HVAC Vault to get the username and password for client and vendor server Step3. Use the username and password to establish connection using pysftp for client. Step4. Store the file in local path. Step5. Segregate the file into different path based on file type Step6 Establish a connection to vendor and copy the file to vendor. Step7 Close the client and Vendor connection Please see the file attached. Also below is the error which I am getting - ERROR:root:Error in getting the file from EBS Outbound Server Traceback (most recent call last): File "FILE_TRANSFER_PROCESS.py", line 191, in file_transfer vendor.put(src_file, dst_file) File "/d01/python3/lib64/python3.6/site-packages/pysftp/__init__.py", line 364, in put confirm=confirm) File "/d01/python3/lib64/python3.6/site-packages/paramiko/sftp_client.py", line 759, in put return self.putfo(fl, remotepath, file_size, callback, confirm) File "/d01/python3/lib64/python3.6/site-packages/paramiko/sftp_client.py", line 720, in putfo s = self.stat(remotepath) File "/d01/python3/lib64/python3.6/site-packages/paramiko/sftp_client.py", line 493, in stat t, msg = self._request(CMD_STAT, path) File "/d01/python3/lib64/python3.6/site-packages/paramiko/sftp_client.py", line 813, in _request return self._read_response(num) File "/d01/python3/lib64/python3.6/site-packages/paramiko/sftp_client.py", line 865, in _read_response self._convert_status(msg) File "/d01/python3/lib64/python3.6/site-packages/paramiko/sftp_client.py", line 894, in _convert_status raise IOError(errno.ENOENT, text) FileNotFoundError: [Errno 2] /custom/OWO/ECE_OWO_20200303_143895.dat -- components: Tests files: File_Transfer_Process_Client.py messages: 363870 nosy: Sandeep priority: normal severity: normal status: open title: Pysftp Issue File Upload is not working - put command type: crash versions: Python 3.7 Added file: https://bugs.python.org/file48967/File_Transfer_Process_Client.py ___ Python tracker <https://bugs.python.org/issue39928> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39928] Pysftp Issue File Upload is not working - put command
Sandeep added the comment: Eric how can I contact the python Mailing list -- status: pending -> open ___ Python tracker <https://bugs.python.org/issue39928> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2724] Error in Python tutorial (http://docs.python.org/tut/node6.html)
New submission from Sandeep Sabnani <[EMAIL PROTECTED]>: Section 4.4 on page http://docs.python.org/tut/node6.html has a for loop which uses the range function. However, the displayed output of that loop is not correct. I ran the same code and got the output as follows: 3 is a prime number 4 = 2 * 2 5 is a prime number 5 is a prime number 5 is a prime number 6 = 2 * 3 7 is a prime number 7 is a prime number 7 is a prime number 7 is a prime number 7 is a prime number 8 = 2 * 4 9 is a prime number 9 = 3 * 3 Can this be corrected in the tutorial as it can be confusing for a python newbie! Thanks! -- assignee: georg.brandl components: Documentation messages: 65996 nosy: georg.brandl, sandeepsabnani severity: normal status: open title: Error in Python tutorial (http://docs.python.org/tut/node6.html) versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2724> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2724] Error in Python tutorial (http://docs.python.org/tut/node6.html)
Sandeep Sabnani <[EMAIL PROTECTED]> added the comment: Oh yes! Thanks for clearing my doubt and apologies for the silly error. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2724> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42836] docs: struct: clarify struct caching behaviour
New submission from Sandeep Subramanian : As per docs in :https://docs.python.org/3.7/library/struct.html#struct.Struct > The compiled versions of the most recent format strings passed to Struct and > the module-level functions are cached, so programs that use only a few format > strings needn’t worry about reusing a single Struct instance. This statement seems to imply that the format string passed as `struct.Struct(format)` is also cached. This doesn't appear to be the case. Only format strings passed to the module level functions seems to be cached. `cache_struct_converter` at https://github.com/python/cpython/blob/v3.7.7/Modules/_struct.c#L2052 appears to be used only in the top module level functions `pack` and `pack_into` and is *not* used in `Struct.__init__`. Would it be better to change the doc to: > The compiled versions of the most recent format strings passed to the > module-level functions are cached, so programs that use only a few format > strings needn’t worry about reusing a single Struct instance. This issue was introduced by https://github.com/python/cpython/commit/3666b3c1f695a145adab1bf644c22e564e8eb0ee and is present in every version since. Refs: https://github.com/python/cpython/pull/7700 https://bugs.python.org/issue33032 -- assignee: docs@python components: Documentation messages: 384476 nosy: docs@python, sandeep2 priority: normal severity: normal status: open title: docs: struct: clarify struct caching behaviour type: enhancement versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue42836> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43157] Bug in methods of creating the list
New submission from sandeep kumar : def generateMatrix(A): d=A-1 data=1 B=[[0]*A]*A for l in range(int(A/2)): i=l j=l for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 j+=1 print() for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 i+=1 print() for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 j-=1 print() for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 i-=1 print() d=d-2 print(d) print(B) if d==0: B[int(A/2)][int(A/2)]=data print(B[int(A/2)][int(A/2)]) print(B) return B ##if i'm using different approach to create 2d list . Then i'm getting right output . in above code i used B=[[0]*A]*A and getting wrong output . A is positive integer. ##If i'm using for i in range(A-1): B.append([0]*A) then i'm getting correct output. but the 2d list generated using both the approach are same. 2d list from approach 1== 2d list from approach 2 --->it is true -- messages: 386602 nosy: samrajput1143 priority: normal severity: normal status: open title: Bug in methods of creating the list versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue43157> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43157] Bug in methods of creating the 2d list
Change by sandeep kumar : -- title: Bug in methods of creating the list -> Bug in methods of creating the 2d list ___ Python tracker <https://bugs.python.org/issue43157> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43157] Bug in methods of creating the 2d list
sandeep kumar added the comment: def generateMatrix(A): d=A-1 data=1 B=[[0]*A]*A for l in range(int(A/2)): i=l j=l for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 j+=1 print() for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 i+=1 print() for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 j-=1 print() for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 i-=1 print() d=d-2 print(d) print(B) if d==0: B[int(A/2)][int(A/2)]=data print(B[int(A/2)][int(A/2)]) print(B) return B #This code is for generating spiral matrix ##if i'm using different approach to create 2d list . Then i'm getting right output . in above code i used B=[[0]*A]*A and getting wrong output . A is positive integer. ##If i'm using for i in range(A-1): B.append([0]*A) then i'm getting correct output. but the 2d list generated using both the approach are same. 2d list from approach 1== 2d list from approach 2 --->it is true -- ___ Python tracker <https://bugs.python.org/issue43157> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16136] Removal of VMS support
Sandeep Mathew added the comment: Hi , I love VMS very much, I could not concentrate actively on python because other work commitments ate up most of my time. I have left my job at HP and am now a PhD student and university of Nevada , Reno . Now that I do not have any professional commitments , I should be able to work on it in a more timely manner. I had used python for an internal project in HP. The problem now I have is that I need access to a VMS machine. I was not able to setup a build bot because buildbot needed some ports to be open , the machine provided HP did not give privilleges to do that. Another thing was that they wanted me to use gnv to compile python in VMS . I however did not really agree with it , gnv is buggy and you need to enable millions to of hacks to gets programs to compile. Programs written for VMS should be written the VMS way not the unix way. I was able to get Python 3.x to compile using gnv finally but it would not run properly. Is it possible for anyone to provide a VMS box with C Compiler and tools ( MMS) so that I can start working on it again. I will try asking HP , whether they would allow me to start working on it on the old VMS cluster they provided. --Thomas -- nosy: +sandman101 ___ Python tracker <http://bugs.python.org/issue16136> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16136] Removal of VMS support
Sandeep Mathew added the comment: It does build with some tweaking here and there. But I ran into runtime issues. I am sorry, I cannot dedicate time on it further. IMHO anything built for VMS should use VMS specific API's in the way they are designed for stability and performance reasons, some more code needs to be written. Regards Sandeep Mathew On Tue, Jun 17, 2014 at 12:31 AM, John Malmberg wrote: > > John Malmberg added the comment: > > Does not look like anything vital to VMS got removed. > > Configure basically worked under current GNV. > > And a few tweaks later with out changing any files checked out of the > Mercurial repository, make is producing a functional python binary before > it quits. > > bash-4.2$ ./python notdeadyet.py > I'm not Dead Yet, I think I'll go for a Walk > bash-4.2$ ./python > Python 3.5.0a0 (default, Jun 17 2014, 00:03:16) [C] on openvms0 > Type "help", "copyright", "credits" or "license" for more information. > >>> Exit > bash-4.2$ uname -a > OpenVMS EAGLE 0 V8.4 AlphaServer_DS10_617_MHz Alpha Alpha HP/OpenVMS > > More work is needed of course, mostly adding some more libraries that > Python is expecting and showing GNV how to have configure and make find > them. A lot of compile warnings need to be resolved. > > -- > > ___ > Python tracker > <http://bugs.python.org/issue16136> > ___ > -- ___ Python tracker <http://bugs.python.org/issue16136> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16136] Removal of VMS support
Sandeep Mathew added the comment: I have asked HP for access to a VMS box so that I restart my work. I initially checked with the university to see if I can get hold of an Itanium box. @Trent : If you have HP - UX already running, you may make use of Hyper-V to get vms running without changing the existing the HP-UX installation. -- ___ Python tracker <http://bugs.python.org/issue16136> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16136] Removal of VMS support
Sandeep Mathew added the comment: Hey, I was given access to HP's open source VMS cluster, Many thanks to HP. I should be able to continue python development for VMS. I shall ping you guys in case I get stuck. I should be good to go --Thomas -- ___ Python tracker <http://bugs.python.org/issue16136> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29141] error in 2to3
New submission from Sandeep Srinivasa: docs_uploaded_at = dict(filter(lambda (x,y):True if len(y) == 3 else False,docs_uploaded_at.iteritems())) produces docs_uploaded_at = dict([x_y for x_y in iter(docs_uploaded_at.items()) if True if len(x_y[1]) == 3 else False]) without_transaction_users = filter(lambda x:False if x.phone in with_transaction_mobile else True,registered) produces without_transaction_users = [x for x in registered if False if x.phone in with_transaction_mobile else True] -- components: 2to3 (2.x to 3.x conversion tool) messages: 284562 nosy: Sandeep Srinivasa priority: normal severity: normal status: open title: error in 2to3 ___ Python tracker <http://bugs.python.org/issue29141> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16136] Removal of VMS support
Sandeep Mathew added the comment: Sorry for late response. I got delayed , I am working on it . Regards Sandeep Mathew 2013/3/9 Jesús Cea Avión : > > Jesús Cea Avión added the comment: > > Ping... > > -- > > ___ > Python tracker > <http://bugs.python.org/issue16136> > ___ -- ___ Python tracker <http://bugs.python.org/issue16136> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com