sequence index must be integer??
I got this after uploading (load_site) a site, when trying to go into one of the directories in ZMI... anyone know what it means?? Too many things in the directory, or...?? Zope Error Zope has encountered an error while publishing this resource. Error Type: TypeError Error Value: sequence index must be integer Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. Traceback (innermost last): File /usr/local/zope/Zope-2.3.3/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /usr/local/zope/Zope-2.3.3/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/zope/Zope-2.3.3/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /usr/local/zope/Zope-2.3.3/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/zope/Zope-2.3.3/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_main) File /usr/local/zope/Zope-2.3.3/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_main) File /usr/local/zope/Zope-2.3.3/lib/python/Shared/DC/Scripts/Bindings.py, line 324, in __call__ (Object: manage_main) File /usr/local/zope/Zope-2.3.3/lib/python/Shared/DC/Scripts/Bindings.py, line 354, in _bindAndExec (Object: manage_main) File /usr/local/zope/Zope-2.3.3/lib/python/App/special_dtml.py, line 236, in _exec (Object: manage_main) File /usr/local/zope/Zope-2.3.3/lib/python/Shared/DC/Scripts/Bindings.py, line 338, in __render_with_namespace__ (Object: manage_tabs) File /usr/local/zope/Zope-2.3.3/lib/python/Shared/DC/Scripts/Bindings.py, line 354, in _bindAndExec (Object: manage_tabs) File /usr/local/zope/Zope-2.3.3/lib/python/App/special_dtml.py, line 236, in _exec (Object: manage_tabs) File /usr/local/zope/Zope-2.3.3/lib/python/DocumentTemplate/DT_With.py, line 151, in render (Object: _(manage_options=filtered_manage_options())) File /usr/local/zope/Zope-2.3.3/lib/python/DocumentTemplate/DT_With.py, line 138, in render (Object: _(option=manage_options[a_])) File /usr/local/zope/Zope-2.3.3/lib/python/DocumentTemplate/DT_Util.py, line 339, in eval (Object: _(option=manage_options[a_])) (Info: manage_options) File <string>, line 0, in ? File /usr/local/zope/Zope-2.3.3/lib/python/DocumentTemplate/DT_Util.py, line 167, in careful_getitem TypeError: (see above)
marc lindahl writes:
I got this after uploading (load_site) a site, when trying to go into one of the directories in ZMI... anyone know what it means?? Too many things in the directory, or...?? .... Error Type: TypeError Error Value: sequence index must be integer .... (Object: _(option=manage_options[a_])) (Info: manage_options) File <string>, line 0, in ? File /usr/local/zope/Zope-2.3.3/lib/python/DocumentTemplate/DT_Util.py, line 167, in careful_getitem TypeError: (see above) Is it possible that you uploaded an object with name "a_"?
Apparently, such an object hides an integer of name "a_". Of course, the object cannot be used to index a sequence. Dieter
Yes, actually there was a file called a_ and one a_.eps. Both illustrator files... would have been uploaded as File... (directory named gifs) I'm still not clear on why such a name is a bad thing? The trailing '_'? I guess if I'm hacking load_site.py I should look for that -- and maybe others?
From: Dieter Maurer <dieter@handshake.de> Date: Mon, 16 Jul 2001 20:24:24 +0200 (CEST) To: marc lindahl <marc@bowery.com> Cc: <zope@zope.org> Subject: Re: [Zope] sequence index must be integer??
marc lindahl writes:
I got this after uploading (load_site) a site, when trying to go into one of the directories in ZMI... anyone know what it means?? Too many things in the directory, or...?? .... Error Type: TypeError Error Value: sequence index must be integer .... (Object: _(option=manage_options[a_])) (Info: manage_options) File <string>, line 0, in ? File /usr/local/zope/Zope-2.3.3/lib/python/DocumentTemplate/DT_Util.py, line 167, in careful_getitem TypeError: (see above) Is it possible that you uploaded an object with name "a_"?
Apparently, such an object hides an integer of name "a_". Of course, the object cannot be used to index a sequence.
Dieter
From: Dieter Maurer <dieter@handshake.de>
Is it possible that you uploaded an object with name "a_"?
I managed to delete it from the ZMI: http://210.67.3.40/gifs/manage_delObjects?ids=a_ phew!
marc lindahl writes:
Yes, actually there was a file called a_ and one a_.eps. Both illustrator files... would have been uploaded as File... (directory named gifs)
I'm still not clear on why such a name is a bad thing? The trailing '_'? I guess if I'm hacking load_site.py I should look for that -- and maybe others? It happens to be the name of an internally used variable. Apparently, the author appended the '_' to avoid clashed with "normel" object ids. In your case, he did not succeed...
Dieter
From: Dieter Maurer <dieter@handshake.de>
It happens to be the name of an internally used variable. Apparently, the author appended the '_' to avoid clashed with "normel" object ids. In your case, he did not succeed...
Hmmm... aren't you supposed to preced internal variables with '_' so they don't pollute the namespace?
marc lindahl writes:
It happens to be the name of an internally used variable. Apparently, the author appended the '_' to avoid clashed with "normel" object ids. In your case, he did not succeed...
Hmmm... aren't you supposed to preced internal variables with '_' so they don't pollute the namespace? In Python, yes. But you cannot do that in DTML.
Dieter
participants (2)
-
Dieter Maurer -
marc lindahl