473,734 Members | 2,511 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FTP Error: Windows AS/400

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.

Sep 13 '05 #1
1 4439
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.

Sep 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4502
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
6
4750
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
9
2294
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. ----------------------------------------------------------------------------
0
1516
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
4
5414
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...
1
3652
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 %>'>
1
3363
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
1
4142
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:...
21
8544
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...
0
6611
by: .nLL | last post by:
Erorr is --------------------- Microsoft VBScript runtime error '800a0046' Permission denied /a.asp, line 3 -----------------------
0
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8776
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,...
0
9449
Oralloy
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...
0
9182
tracyyun
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...
0
8186
agi2029
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...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
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
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.