I am trying to use Win Python to ftp files from an AS/400 IFS directory
down to my Windows machine.
I seem to get stuck when I am trying to send a command to the AS/400 to
switch file systems from native to IFS and then to issue a cd to my
folder. I get the error below.
If anyone has had experience trying to ftp from a 400, I would greatly
appreciate any info on the topic.
Code:
import ftplib, os
filename=''
path = "jde7333"
os.chdir('c:\\f tp_jde400')
ftp = ftplib.FTP('tes t400')
ftp.login('onew orld', 'onew0r1d')
#ftp.sendcmd('q uote site namefmt 1')
ftp.sendcmd('si te namefmt 1')
ftp.cwd(path)
#remotefiles = ftp.nlst()
#ftp.retrlines( 'LIST')
#for filename in remotefiles:
# file = open(filename, 'wb')
# ftp.retrbinary( 'RETR ' + filename, file.write, 1024)
# file.close()
ftp.quit()
Error:
Traceback (most recent call last):
File "C:\Python24\To ols\scripts\ftp 400.py", line 10, in ?
ftp.cwd(path)
File "C:\Python24\li b\ftplib.py", line 494, in cwd
return self.voidcmd(cm d)
File "C:\Python24\li b\ftplib.py", line 246, in voidcmd
return self.voidresp()
File "C:\Python24\li b\ftplib.py", line 221, in voidresp
resp = self.getresp()
File "C:\Python24\li b\ftplib.py", line 214, in getresp
raise error_perm, resp
ftplib.error_pe rm: 501 Unknown extension in database file name. 1 4437
I've used DOS FTP to hit AS/400 systems before and usually have to completely
qualify the file name or ensure that I'm in the correct directory. When you use
command-line FTP to get the file, do these commands mimic your commands?
What version of python are you using?
If you issue PWD on the FTP site, what is returned when you're in the correct
folder? Can you use the sendcmd() function to mimic the functionality of cwd()
for this purpose?
I don't have easy access to an AS/400 with which to test, but maybe there's an
idea or two here that's worth trying.
-Pete
"Tim G." <tg********@yah oo.com> wrote: I am trying to use Win Python to ftp files from an AS/400 IFS directory down to my Windows machine.
I seem to get stuck when I am trying to send a command to the AS/400 to switch file systems from native to IFS and then to issue a cd to my folder. I get the error below.
If anyone has had experience trying to ftp from a 400, I would greatly appreciate any info on the topic.
Code:
import ftplib, os
filename='' path = "jde7333" os.chdir('c:\\f tp_jde400')
ftp = ftplib.FTP('tes t400') ftp.login('onew orld', 'onew0r1d') #ftp.sendcmd('q uote site namefmt 1') ftp.sendcmd('si te namefmt 1') ftp.cwd(path) #remotefiles = ftp.nlst() #ftp.retrlines( 'LIST') #for filename in remotefiles: # file = open(filename, 'wb') # ftp.retrbinary( 'RETR ' + filename, file.write, 1024) # file.close()
ftp.quit()
Error:
Traceback (most recent call last): File "C:\Python24\To ols\scripts\ftp 400.py", line 10, in ? ftp.cwd(path) File "C:\Python24\li b\ftplib.py", line 494, in cwd return self.voidcmd(cm d) File "C:\Python24\li b\ftplib.py", line 246, in voidcmd return self.voidresp() File "C:\Python24\li b\ftplib.py", line 221, in voidresp resp = self.getresp() File "C:\Python24\li b\ftplib.py", line 214, in getresp raise error_perm, resp ftplib.error_pe rm: 501 Unknown extension in database file name. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: B Golash |
last post by:
Hi
I`m trying to install a third-party control. During
the install I receive this error...see the url below.
I have no idea as to the meaning of the error.
www.woodsolutions.com/download/ErrorLoadComp.jpg
|
by: Peter Frost |
last post by:
Please help
I don't know if this is possible but what I would really like to do is
to use On Error Goto to capture the code that is being executed when
an error occurs.
Any help would be much appreciated.
Thanks in advance
|
by: JTrigger |
last post by:
When I compile my project using the IDE on a development machine it works
just fine. When I compile it on the server using csc.exe, I get the
following error when I try to bring it up in the web browser. What is the
issue?
Thanks,
Jim
Server Error in '/psnRequest' Application.
----------------------------------------------------------------------------
|
by: Jie |
last post by:
Does anyone know why I keep having the following error. I have to rebuild
the solution every time I run it in design mode. thanks
jie
Server Error in '/ReapPortal' Application.
----------------------------------------------------------------------------
----
Compilation Error
|
by: james margey |
last post by:
Hi to all,
I have spent 3 days at this error and i have two days to go for a
deadline, and i am about to go off my nut, the reason being: Microsoft
dont seem to be able to provide a solution, I have trawled the web and
the few that have the same error have not being provided a fix. This
error occurs if i make the slightest change in my project. If i
REBUILD my project no error occurs. So i keep having to rebuild my
project - this is not...
| |
by: Carlos Kim via DotNetMonster.com |
last post by:
Compiler Error Message: CS1026: ) expected
Source Error:
Line 12: <body MS_POSITIONING="GridLayout">
Line 13: <form id="Form1" method="post" runat="server">
Line 14: <cr:CrystalReportViewer id=CrystalReportViewer3 style="Z-INDEX:
101; LEFT: 24px; POSITION: absolute; TOP: 40px" runat="server"
Height="1013px" Width="901px" ReportSource='<%# c:\inetpub\wwwroot\
WebApplication4\CrystalReport222.rpt %>'>
|
by: abh1508 |
last post by:
Following a release of code the following problem occurs on certain asp
..net pages. This is not a problem on other testing/demo environments.
IIS seems to be creating certain files twice in the temporary internet
files directory. Any advice or suggestions appreciated.
Server Error in '/ContactCentre/Global' Application.
--------------------------------------------------------------------------------
Compilation Error
|
by: Bruce |
last post by:
We suddenly got a mysterious error message on our Windows Server 2003 (SP1)
after rolling out a bug fix on a web services application this morning. The
application compiles and runs fine on the development workstation (from vs
2005 on Windows XP Pro), but when I run "Copy Web Site..." to move the app
out from VS to the server, then all accesses to the web service via a
browser show this error message: "Compiler Error Message: CS0006:...
|
by: Mark Rae |
last post by:
Hi,
I have an ASP.NET 2 web application (not web site) project and am using a
web deployment project to deploy to the testing, then the production server.
All has been working well for months now, but today after a recompilation,
the app is throwing the error below when accessing a certain page, although
there are no errors in the compilation process.
Compilation Error
Description: An error occurred during the compilation of a...
|
by: .nLL |
last post by:
Erorr is
---------------------
Microsoft VBScript runtime error '800a0046'
Permission denied
/a.asp, line 3
-----------------------
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |