Hi all, I am trying to use ZClient to access a Python Script inside Zope serve script is very simple it is as follows. #!/usr/bin/python from ZPublisher import Client Client.call("http://localhost:8080/test_folder/Portal1/abcd", 'username', 'password') This is executed from a command prompt. When I execute this script I get following error. Traceback (most recent call last): File "./testCron.py", line 8, in ? 'shashank1') File "/usr/share/partecs/zope/lib/python/ZPublisher/Client.py", line 277, in call return apply(Function(url,username=username, password=password), (), kw) File "/usr/share/partecs/zope/lib/python/ZPublisher/Client.py", line 154, in __call__ raise NotAvailable, RemoteException( bci.NotAvailable: string index out of range (File: http://localhost:8080/test_folder/Portal1/abcd Line: []) None None for None I am using Zope 2.7.3, Python 2.3.4 with Plone 2.0.5 installed this script I am trying to access is inside a Plone site I googled around but I could not get a satisfactory answer. TIA -- Shashank Ashtikar
On Mon, 27 Dec 2004 15:26:16 +0530, Shashank Ashtikar <shashank.ashtikar@gmail.com> wrote:
Hi all,
I am trying to use ZClient to access a Python Script inside Zope serve script is very simple it is as follows.
not really a solution to your traceback, .. but have you considered wget, or lynx? (if this is linux) lynx -auth=user:pa http://your.server/your/script otherwise, i'll just shut up :))
#!/usr/bin/python
from ZPublisher import Client
Client.call("http://localhost:8080/test_folder/Portal1/abcd", 'username', 'password')
This is executed from a command prompt. When I execute this script I get following error.
Traceback (most recent call last): File "./testCron.py", line 8, in ? 'shashank1') File "/usr/share/partecs/zope/lib/python/ZPublisher/Client.py", line 277, in call return apply(Function(url,username=username, password=password), (), kw) File "/usr/share/partecs/zope/lib/python/ZPublisher/Client.py", line 154, in __call__ raise NotAvailable, RemoteException( bci.NotAvailable: string index out of range (File: http://localhost:8080/test_folder/Portal1/abcd Line: []) None None for None
I am using Zope 2.7.3, Python 2.3.4 with Plone 2.0.5 installed this script I am trying to access is inside a Plone site
I googled around but I could not get a satisfactory answer.
TIA
-- Shashank Ashtikar _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- http://myzope.kedai.com.my - my-zope org
Shashank Ashtikar wrote at 2004-12-27 15:26 +0530:
... 154, in __call__ raise NotAvailable, RemoteException( bci.NotAvailable: string index out of range (File: http://localhost:8080/test_folder/Portal1/abcd Line: []) None None for None
Look into your "error_log" object (in Zope's "Root Folder") to learn more about this problem! -- Dieter
On Tue, 28 Dec 2004 20:23:59 +0100, Dieter Maurer <dieter@handshake.de> wrote:
...
Look into your "error_log" object (in Zope's "Root Folder") to learn more about this problem!
Error log does not have any errors concerned with this. I think this error is coming even before a call to the script is being made. If I use wget it works I mean the script is being called properly. But it would be better if I could use this way to get things done. -- Shashank Ashtikar
Shashank Ashtikar wrote at 2004-12-29 09:59 +0530:
Look into your "error_log" object (in Zope's "Root Folder") to learn more about this problem!
Error log does not have any errors concerned with this. I think this error is coming even before a call to the script is being made.
You are right. The exception happens in "Client.py" and not the server. I would temporarily add a "raise" before line 154. This would give you a full traceback in the client code. With it, you may be able to fix the problem. -- Dieter
participants (3)
-
Bakhtiar A Hamid -
Dieter Maurer -
Shashank Ashtikar