Re: [Zope] Zope Digest, Vol 91, Issue 2

2011-12-06 Thread John Schinnerer

Aloha,

On 12/05/2011 05:30 PM, Sareesh Sudhakaran wrote:

I have downloaded Python and PHP and have used both with Komodo Edit
IDE, side by side, and have realized I would ideally want to program in
Python. But I'm okay with PHP also - which means my choice of
programming language depends on my choice of DB. Also, PHP has OOP
'capabilities' whatever that means - so maybe I can still use it like
Python to a certain extent.


Google

is php object oriented

and you'll get plenty of somewhat relevant hits. In terms of true OO 
languages (like python, ruby, java...), this may be a most relevant link:


http://michaelkimsal.com/blog/php-is-not-object-oriented/

And, what he is pointing out may not be a problem for you, if mostly 
procedural with some object capabilities is suitable for your needs.


If you are using python to build a zope product, the ZODB is used 
automagically, you don't have to do anything special. To access MySQL 
DBs you have to add an appropriate zope product to handle queries. A 
search on


zope with mysql

...or vice versa returns mostly IMO embarrassingly old hits, many from 
old.zope.org and five to ten years old. So either the old info is still 
valid, or there is a lack of current information on using zope with 
mysql (though it is said that it is easy - where are non-stale 
howtos/tutorials for those who don't already know how?).



Can you point me to a resource for Python and mySQL? I've bought 'Dive
into Python' but it has no reference on how to use it with mySQL. If my
current hosting provider supports Python and mySQL, can I make it work?
They won't let me install anything on the server side though, so I can't
use any modules that aren't there already.


Look for info/howtos on Python's DB-API and the MySQLdb module.
For example:

http://pypi.python.org/pypi/MySQL-python/
http://sourceforge.net/projects/mysql-python/
http://zetcode.com/databases/mysqlpythontutorial/
http://www.devshed.com/c/a/Python/MySQL-Connectivity-With-Python/

...though sounds like you can't add such modules on your current 
provider's server if not there already.
Myself for a project of this complexity I would want much more control 
of my server options than it sounds like you have. A low-cost VPS (I use 
linode.com), or simply use localhost until I have my options sorted out.


regards,
John S.



--
John Schinnerer - M.A., Whole Systems Design

- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
j...@eco-living.net
http://eco-living.net
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Help in deciding approach to Web App

2011-12-05 Thread John Schinnerer

On 12/04/2011 09:56 PM, Fernando Martins wrote:

On 12/04/2011 09:31 PM, John Schinnerer wrote:

In any case, this looks (to me anyhow) like a very object-oriented
system you are modeling so an object oriented approach and language
would seem most suitable.


And how would you create (and update) objects in Python for:

at least 500 tools as of now, and it is bound to grow in the future as
newer tools are introduced. Existing tools will also have version updates.

Each tool, on average, has at least 100 properties that define the tool.
Some of them have as high as 1000 unique properties.


How familiar are you with OOP?

What I mean is, when I read your high-level description of what you want 
to do, I imagine objects interacting with other. In your car wash 
example I see that, for instance. Or any kind of work-flow, which is 
what this sounds like to me. A state machine.


Each tool is an object; it knows what its properties and abilities and 
possible states are and can communicate them to other objects and can 
accept and act on communication from other objects. In that way the 
objects interact with one another to do whatever it is you build them to 
do.


I'm thinking of your car wash metaphor. In a car wash there are a 
variety of elements (objects) that communicate with one another to move 
the car through and to wash it as it moves through. Simple example:


* mechanism that pulls or pushes the car through
* mechanism that sprays it with water and soap
* mechanism that scrubs and wipes and rubs it
* mechanism that sprays it with rinse water
* drying mechanism(s)

These all need to signal one another so they do the right thing at the 
right time. Spray (or scrub or blow hot air) only when the car is in the 
right place for each.


If some tools can be built by adding to/extending other tools, that is 
an object-friendly situation, since enhancing an existing tool to make 
another that you need saves you having to create all tools from scratch.


In the car wash, maybe the different sized scrubbers used are all made 
by bolting together two or more of the smallest size scrubber. Maybe in 
parallel, maybe in series, depends on what is needed.
Maybe the same scrubber controller can have different size brushes 
attached to it.


In short, an object - tool - is code and data that interacts with other 
tools (other entities of code and data).


An upgrade to a tool would involve changing the code and/or data that 
constitutes the tool. If that introduces some new way of interacting 
that other tools need to also know, then you add that to those tools also.


Adding more tools means coding them. If they can be based on existing 
tools, so much the easier (and more object-appropriate).


So that's some high-level information about an object-oriented approach 
to what I think your project is about.


Tthe flexibility you appear to need as the system grows may be 
problematic for an RDB. And, my bias is OO, so perhaps someone who 
thinks in RDB-space can describe at high level how this would look in an 
RDB implmentation.


cheers,
John S.





--
John Schinnerer - M.A., Whole Systems Design

- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
j...@eco-living.net
http://eco-living.net
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Help in deciding approach to Web App

2011-12-04 Thread John Schinnerer
 lists -
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope-dev )


--
John Schinnerer - M.A., Whole Systems Design

- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
j...@eco-living.net
http://eco-living.net
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Safe way to abort or re-start stalled out ZODB pack?

2010-01-27 Thread John Schinnerer
Hello,

This is for

Zope 2.9.8-final, python 2.4.4, linux2 (debian)
(installed by the Plone 2.5.5 installer if that matters, and using 
zeoserver)

I have a ZODB pack operation started via the ZMI control panel that has 
failed to complete. It appears to be from a disk space issue (traceback 
below).

The zope instance is still working fine on the pre-pack ZODB, and, there 
is a Data.fs.pack file sitting in ../zeocluster/server/var which hasn't 
been modified in the last ten hours.

I need to know how to deal with this situation safely - how to abort 
and/or safely re-start the pack (the disk space issue has been dealt with).
Some questions that have come to mind are:
Is it safe to just restart zope?
Will that clear the stalled pack operation automagically?
Will I need to do something manually with the Data.fs.pack file?

Any assistance appreciated...!
thanks,
John S.

Traceback:
-
2010-01-27T03:51:09 INFO ZEO.zrpc.Connection(S) (127.0.0.1:35831) vote() 
raised exception: [Errno 28] No space left on device
Traceback (most recent call last):
   File /opt/Plone-2.5.5/lib/python/ZEO/zrpc/connection.py, line 421, 
in handle_request
 ret = meth(*args)
   File /opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py, line 465, in 
vote
 return self._wait(lambda: self._vote())
   File /opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py, line 583, in 
_wait
 return self._restart()
   File /opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py, line 599, in 
_restart
 resp = self._thunk()
   File /opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py, line 465, in 
lambda
 return self._wait(lambda: self._vote())
   File /opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py, line 539, in 
_vote
 return self.storage.tpc_vote(self.transaction)
   File /opt/Plone-2.5.5/lib/python/ZODB/FileStorage/FileStorage.py, 
line 891, in tpc_vote
 self._file.flush()
IOError: [Errno 28] No space left on device
---

-- 
John Schinnerer - M.A., Whole Systems Design

- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
j...@eco-living.net
http://eco-living.net
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Safe way to abort or re-start stalled out ZODB pack?

2010-01-27 Thread John Schinnerer
Thanks Bakhtiar,

That's what I was hoping, and I wanted some confirmation from those 
who've done it.
I just did as you indicated - deleted Data.fs.pack, then ran the pack 
again. It completed successfully.

regards,
John S.

Bakhtiar A Hamid wrote:
 On Thu, Jan 28, 2010 at 5:06 AM, John Schinnerer j...@eco-living.net wrote:
 Hello,

 This is for

 Zope 2.9.8-final, python 2.4.4, linux2 (debian)
 (installed by the Plone 2.5.5 installer if that matters, and using
 zeoserver)

 I have a ZODB pack operation started via the ZMI control panel that has
 failed to complete. It appears to be from a disk space issue (traceback
 below).

 The zope instance is still working fine on the pre-pack ZODB, and, there
 is a Data.fs.pack file sitting in ../zeocluster/server/var which hasn't
 been modified in the last ten hours.
 
 
 Hi
 
 we've had the same issue (on an old setup with limited disk space) and
 removing Data.fs.pack should suffice.
 
 We just repack after deleting.
 
 you can copy Data.fs if you want to.
 
 hth
 I need to know how to deal with this situation safely - how to abort
 and/or safely re-start the pack (the disk space issue has been dealt with).
 Some questions that have come to mind are:
 Is it safe to just restart zope?
 Will that clear the stalled pack operation automagically?
 Will I need to do something manually with the Data.fs.pack file?

 Any assistance appreciated...!
 thanks,
 John S.

 Traceback:
 -
 2010-01-27T03:51:09 INFO ZEO.zrpc.Connection(S) (127.0.0.1:35831) vote()
 raised exception: [Errno 28] No space left on device
 Traceback (most recent call last):
   File /opt/Plone-2.5.5/lib/python/ZEO/zrpc/connection.py, line 421,
 in handle_request
 ret = meth(*args)
   File /opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py, line 465, in
 vote
 return self._wait(lambda: self._vote())
   File /opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py, line 583, in
 _wait
 return self._restart()
   File /opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py, line 599, in
 _restart
 resp = self._thunk()
   File /opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py, line 465, in
 lambda
 return self._wait(lambda: self._vote())
   File /opt/Plone-2.5.5/lib/python/ZEO/StorageServer.py, line 539, in
 _vote
 return self.storage.tpc_vote(self.transaction)
   File /opt/Plone-2.5.5/lib/python/ZODB/FileStorage/FileStorage.py,
 line 891, in tpc_vote
 self._file.flush()
 IOError: [Errno 28] No space left on device
 ---

 --
 John Schinnerer - M.A., Whole Systems Design
 
 - Eco-Living -
 Whole Systems Design Services
 People - Place - Learning - Integration
 j...@eco-living.net
 http://eco-living.net
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope-dev )

 

-- 
John Schinnerer - M.A., Whole Systems Design

- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
j...@eco-living.net
http://eco-living.net
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Character display issues upgrading 2.8.8 to 2.9.8

2008-02-07 Thread John Schinnerer

Aloha,

Andreas Jung wrote:
--On 6. Februar 2008 21:21:42 -1000 John Schinnerer 
[EMAIL PROTECTED] wrote:



Aloha,

I am in the process of moving from zope 2.8.8 to zope 2.9.8 (running on
debian 4.0).


Why not 2.10 or 2.11?


The zope instance also supports some plone 2.5.x sites.
Complete upgrade needs to be zope 2.8.8 to 2.9.8 and plone 2.5.0 to 2.5.5.
I have installed the new versions using the unified installer. Does that 
make this impossible?

Should I just move this whole question to plone list?
I started it here because I'm having only this one zope problem so far...


I am transferring individual zope sites from 2.8.8 instance to 2.9.8
instance via export/import. So far everything is fine except...


..which is basically unsupported since source and destination system run
different Zope versions.


Well, it worked last time from 2.7.x to 2.8.x. Not so lucky time I guess.

Anyone else have pointers to what I need to know?

When I search zope.org for upgrade zope the only relevant article on 
the first three pages of results was last updated in August 2003 and is 
useless. Google doesn't get me anything much better. There is no upgrade 
information on or linked from the zope 2.9.8 release pages. I found some 
generic info on the zope wiki finally, however of course it doesn't 
cover plone upgrades.


thanks,
John S.


--
John Schinnerer, MA WSD
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


[Zope] Character display issues upgrading 2.8.8 to 2.9.8

2008-02-06 Thread John Schinnerer

Aloha,

I am in the process of moving from zope 2.8.8 to zope 2.9.8 (running on 
debian 4.0).


I am transferring individual zope sites from 2.8.8 instance to 2.9.8 
instance via export/import. So far everything is fine except...


I have some content in StructuredDocument objects that includes text 
with some accented French characters, and some of the curly quotes (the 
6--9 quotes) and real apostrophes and that sort of thing. They are not 
displaying correctly in the 2.9.8 zope - they show up as whatever symbol 
the browser uses to say oops, can't display this correctly.


Both zopes are running on my dev system and I'm looking with all the 
same browsers so it seems it must be something to do with zope handling 
the characters (or not).


The zope.conf settings for default-zpublisher-encoding are left at the 
default (iso-8859-15) in both instances, if that is relevant.


I've never had any problem like this before, such as in previous 
upgrades of 2.7.x to 2.8.x. I don't even know where to look, aside from 
the zope.conf setting above which is the same in both cases.


Any ideas why this is happening?
Any help appreciated!

thanks,
John S.

--
John Schinnerer, MA WSD
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


[Zope] Error starting zope - undefined symbol: PyUnicodeUCS2_AsEncodedString

2007-06-21 Thread John Schinnerer

Aloha,

I have just attempted my first zope install using a python built from 
source and am getting an error traceback ending with:


undefined symbol: PyUnicodeUCS2_AsEncodedString

...when I try to start zope (full traceback at end of msg).

The story:
I need to get a zope 2.8.8 up and running on debian Etch (4.0) and 
python 2.3.x is not available as debian package on Etch. So...


I got the python 2.3.6 tarball from python.org, followed the build 
instructions and amazingly enough got it built and installed.

I already have python 2.4 so I made sure to put 2.3 in its' own path.

Then I got zope 2.8.8 tarball and built that, using the '--with-python=' 
option to specify my python 2.3 installation (/usr/local/bin/python2.3 
FWIW).


The zope build seemed to complete fine also.
However when trying to start zope 2.8.8 I get the undefined symbol error.
The most relevant info I could google up is here:
http://www.gossamer-threads.com/lists/zope/users/208596

I get that there may be some issue with the two build processes and 
something called UCS4 vs. UCS2 mixed up somehow.

The rest, like how that happened and/or how to fix it, is way over my head.

Can anyone clarify the UCS2/UCS4 issue and how to resolve it?

thanks,
John S.

--
John Schinnerer, MA WSD
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] Error starting zope - undefined symbol: PyUnicodeUCS2_AsEncodedString

2007-06-21 Thread John Schinnerer

Apologies, forgot to paste in the full traceback, here it is.
FWIW I also have zope 2.9.7 installed from source and working just fine 
on this same machine (using python 2.4.4 packaged with Etch).


Traceback (most recent call last):
  File /var/lib/zope2.8.8/lib/python/Zope2/Startup/zopectl.py, line 
322, in ?

main()
  File /var/lib/zope2.8.8/lib/python/Zope2/Startup/zopectl.py, line 
280, in main

options.realize(args)
  File /var/lib/zope2.8.8/lib/python/Zope2/Startup/zopectl.py, line 
91, in realize

ZDOptions.realize(self, *args, **kw)
  File /var/lib/zope2.8.8/lib/python/zdaemon/zdoptions.py, line 273, 
in realize

self.load_schema()
  File /var/lib/zope2.8.8/lib/python/zdaemon/zdoptions.py, line 321, 
in load_schema

self.schema = ZConfig.loadSchema(self.schemafile)
  File /var/lib/zope2.8.8/lib/python/ZConfig/loader.py, line 31, in 
loadSchema

return SchemaLoader().loadURL(url)
  File /var/lib/zope2.8.8/lib/python/ZConfig/loader.py, line 65, in 
loadURL

return self.loadResource(r)
  File /var/lib/zope2.8.8/lib/python/ZConfig/loader.py, line 159, in 
loadResource

schema = ZConfig.schema.parseResource(resource, self)
  File /var/lib/zope2.8.8/lib/python/ZConfig/schema.py, line 27, in 
parseResource

xml.sax.parse(resource.file, parser)
  File /var/lib/zope2.8.8/lib/python/Zope2/Startup/__init__.py, line 
33, in parse

check_python_version()
  File xml/sax/expatreader.py, line 107, in parse
  File xml/sax/xmlreader.py, line 123, in parse
  File xml/sax/expatreader.py, line 207, in feed
  File xml/sax/expatreader.py, line 300, in start_element
  File /var/lib/zope2.8.8/lib/python/ZConfig/schema.py, line 99, in 
startElement

getattr(self, start_ + name)(attrs)
  File /var/lib/zope2.8.8/lib/python/ZConfig/schema.py, line 475, in 
start_schema

keytype, valuetype, datatype = self.get_sect_typeinfo(attrs)
  File /var/lib/zope2.8.8/lib/python/ZConfig/schema.py, line 201, in 
get_sect_typeinfo

datatype = self.get_datatype(attrs, datatype, null, base)
  File /var/lib/zope2.8.8/lib/python/ZConfig/schema.py, line 194, in 
get_datatype

return self._registry.get(dtname)
  File /var/lib/zope2.8.8/lib/python/ZConfig/datatypes.py, line 398, 
in get

t = self.search(name)
  File /var/lib/zope2.8.8/lib/python/ZConfig/datatypes.py, line 423, 
in search

package = __import__(n, g, g, component)
  File /var/lib/zope2.8.8/lib/python/Zope2/Startup/datatypes.py, line 
20, in ?

from ZODB.config import ZODBDatabase
  File /var/lib/zope2.8.8/lib/python/ZODB/__init__.py, line 21, in ?
from persistent import TimeStamp
  File /var/lib/zope2.8.8/lib/python/persistent/__init__.py, line 19, 
in ?

from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY
ImportError: /var/lib/zope2.8.8/lib/python/persistent/cPersistence.so: 
undefined symbol: PyUnicodeUCS2_AsEncodedString



John Schinnerer wrote:

Aloha,

I have just attempted my first zope install using a python built from 
source and am getting an error traceback ending with:


undefined symbol: PyUnicodeUCS2_AsEncodedString

...when I try to start zope (full traceback at end of msg).

The story:
I need to get a zope 2.8.8 up and running on debian Etch (4.0) and 
python 2.3.x is not available as debian package on Etch. So...


I got the python 2.3.6 tarball from python.org, followed the build 
instructions and amazingly enough got it built and installed.

I already have python 2.4 so I made sure to put 2.3 in its' own path.

Then I got zope 2.8.8 tarball and built that, using the '--with-python=' 
option to specify my python 2.3 installation (/usr/local/bin/python2.3 
FWIW).


The zope build seemed to complete fine also.
However when trying to start zope 2.8.8 I get the undefined symbol error.
The most relevant info I could google up is here:
http://www.gossamer-threads.com/lists/zope/users/208596

I get that there may be some issue with the two build processes and 
something called UCS4 vs. UCS2 mixed up somehow.

The rest, like how that happened and/or how to fix it, is way over my head.

Can anyone clarify the UCS2/UCS4 issue and how to resolve it?

thanks,
John S.



--
John Schinnerer, MA WSD
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] Error starting zope - undefined symbol: PyUnicodeUCS2_AsEncodedString

2007-06-21 Thread John Schinnerer



Andreas Jung wrote:



--On 20. Juni 2007 21:03:20 -1000 John Schinnerer [EMAIL PROTECTED] 
wrote:



Aloha,

I have just attempted my first zope install using a python built from
source and am getting an error traceback ending with:

undefined symbol: PyUnicodeUCS2_AsEncodedString

...when I try to start zope (full traceback at end of msg).

The story:
I need to get a zope 2.8.8 up and running on debian Etch (4.0) and python
2.3.x is not available as debian package on Etch. So...

I got the python 2.3.6 tarball from python.org, followed the build
instructions and amazingly enough got it built and installed.
I already have python 2.4 so I made sure to put 2.3 in its' own path.

Then I got zope 2.8.8 tarball and built that, using the '--with-python='
option to specify my python 2.3 installation (/usr/local/bin/python2.3
FWIW).

The zope build seemed to complete fine also.
However when trying to start zope 2.8.8 I get the undefined symbol error.
The most relevant info I could google up is here:
http://www.gossamer-threads.com/lists/zope/users/208596

I get that there may be some issue with the two build processes and
something called UCS4 vs. UCS2 mixed up somehow.
The rest, like how that happened and/or how to fix it, is way over my
head.

Can anyone clarify the UCS2/UCS4 issue and how to resolve it?


You have definitely some Python module somewhere in our sys.path or 
PYTHONPATH compiled against a different Python versiontrible

check that.


Thanks...I have no idea how to do that unfortunately.
This is the first time I've built python from source. I just followed 
the build instructions in the tarball and it worked. At least, I have 
a working python 2.3 in the location I specified for --with-python 
when building zope.
From various list messages about this same error message I get that 
there is some mismatch involving UCS2 vs. UCS4 compiled pieces - if I 
grok correctly...?
I have no idea what controls that and saw nothing about it in the python 
or zope build docs.
I previously had zope 2.8.8 running on debian Sarge with the packaged 
python 2.3 no problem.

So...onwards...somehow...

John S.

--
John Schinnerer, MA WSD
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] Error starting zope - undefined symbol: PyUnicodeUCS2_AsEncodedString

2007-06-21 Thread John Schinnerer



Andreas Jung wrote:



--On 20. Juni 2007 21:58:18 -1000 John Schinnerer [EMAIL PROTECTED] 
wrote:

Thanks...I have no idea how to do that unfortunately.
This is the first time I've built python from source. I just followed the
build instructions in the tarball and it worked. At least, I have a
working python 2.3 in the location I specified for --with-python when
building zope.
 From various list messages about this same error message I get that
there is some mismatch involving UCS2 vs. UCS4 compiled pieces - if I
grok correctly...?


Right.

If you install Python using

 configure --prefix=/opt/python-2.4; make;make install

and configure Zope using

 configure --with-python=/opt/python-2.4/bin/python2.4; make; make install

you should never get into such trouble. Somehow your environment or setup
must be broken. Possibly you're installing Zope over an existing Zope 
installation with possibly old zopectl/runzope files inside the 'bin' 
folder
which won't be replaced by make install. So check the python 
configuration within your bin/zopectl|runzope files.


Thanks again - the above is what I thought I did (matching the --prefix 
and the --with-python) - however somewhere I blew it somehow as the 
control files point to the wrong python.

I'll try again and hopefully get it right. Thanks for the extra assist.

cheers,
John S.

--
John Schinnerer, MA WSD
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] Error starting zope - undefined symbol: PyUnicodeUCS2_AsEncodedString

2007-06-21 Thread John Schinnerer



John Schinnerer wrote:



Andreas Jung wrote:



--On 20. Juni 2007 21:58:18 -1000 John Schinnerer 
[EMAIL PROTECTED] wrote:

Thanks...I have no idea how to do that unfortunately.
This is the first time I've built python from source. I just followed 
the

build instructions in the tarball and it worked. At least, I have a
working python 2.3 in the location I specified for --with-python when
building zope.
 From various list messages about this same error message I get that
there is some mismatch involving UCS2 vs. UCS4 compiled pieces - if I
grok correctly...?


Right.

If you install Python using

 configure --prefix=/opt/python-2.4; make;make install

and configure Zope using

 configure --with-python=/opt/python-2.4/bin/python2.4; make; make 
install


you should never get into such trouble. Somehow your environment or setup
must be broken. Possibly you're installing Zope over an existing Zope 
installation with possibly old zopectl/runzope files inside the 'bin' 
folder
which won't be replaced by make install. So check the python 
configuration within your bin/zopectl|runzope files.


Thanks again - the above is what I thought I did (matching the --prefix 
and the --with-python) - however somewhere I blew it somehow as the 
control files point to the wrong python.

I'll try again and hopefully get it right. Thanks for the extra assist.


Well, I'm not crazy. I just rebuilt it all and triple checked that I 
gave the matching --with-python when configuring the zope build. I did.
And, it did not get used...the zopectl and runzope files were created 
with the default path (to the wrong python) anyhow!


So I fixed that manually, and now (after fixing some perms issues) it 
starts up OK.


thanks again,
John S.

--
John Schinnerer, MA WSD
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] Error starting zope - undefined symbol:PyUnicodeUCS2_AsEncodedString

2007-06-21 Thread John Schinnerer


Jürgen Herrmann wrote:


On Thu, June 21, 2007 11:02, John Schinnerer wrote:


John Schinnerer wrote:


Andreas Jung wrote:

...

If you install Python using

 configure --prefix=/opt/python-2.4; make;make install

and configure Zope using

 configure --with-python=/opt/python-2.4/bin/python2.4; make; make
install

you should never get into such trouble. Somehow your environment or setup must 
be broken.

Possibly you're installing Zope over an existing Zope installation with 
possibly old
zopectl/runzope files inside the 'bin' folder

which won't be replaced by make install. So check the python configuration 
within your

bin/zopectl|runzope files.

Thanks again - the above is what I thought I did (matching the --prefix and the 
--with-python)

- however somewhere I blew it somehow as the control files point to the wrong 
python.

I'll try again and hopefully get it right. Thanks for the extra assist.

Well, I'm not crazy. I just rebuilt it all and triple checked that I gave the 
matching

--with-python when configuring the zope build. I did. And, it did not get 
used...the zopectl and
runzope files were created with the default path (to the wrong python) anyhow!

did you really delete the existing files in your bin folder before installing 
zope again? these
files are NOT recreated!


Yes. I deleted all files and directories created when building python 
2.3 and zope 2.8.8 the first time and started over.


And when startup of zope failed with the same error I checked the 
control files again and they had the default python path and not the one 
I specified with --with-python in the configure.


cheers,
John S.


--
John Schinnerer, MA WSD
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] need advice on mass data processing

2007-01-09 Thread John Schinnerer

Aloha,

Sounds like your data case/data model is better suited to a SQL database 
(Relational DB instead of Object DB).


Zope works with MySQL, PostgreSQL etc. via ZSQLMethods.
Look into using those, with your existing data going into a SQL DB (or 
maybe it is already?), if you want/need to access and manipulate the 
data from within zope applications.


Then you also have the option of accessing that data via any 
app/platform that can talk to your SQL DB.


I have a project I am working on where a portion of the data is very 
RDB-type data, while the rest is more zope/object content-management stuff.


So the RDB-type data will be in a MySQL DB, and, accessible through the 
same zope-based platform that also provides the CMS for document/object 
management.
Meanwhile if other stakeholders now or later want access to the RDB-type 
data they don't have to use zope, they can use whatever they want that 
will talk to MySQL.


cheers,
John S.


Allen Huang wrote:


Sorry Andreas..
 
My product is rewritten in python placed in the product folder. So yes, 
it is a instance of a class.
 
In the future, I will be storing more data into one instance from other 
dbase file (The total columns may vary).
 
I'm still in the developing stage and this is just a test run to know 
that is the length of processing time I'm look at. I want each entry to 
be an instance because I'm planning to create other interactive 
functions (edit and query(ZCatalog maybe, I'm not sure yet) and 
more ) for particular info.
 
I've never thought of using a BTree because I don't know enough about 
it. I'll look into it but will BTree still be a better choice than 
making instance if I'm going to make interactive functions?
 
Any other suggestions?



 
- Original Message 

From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Tuesday, January 9, 2007 1:55:34 PM
Subject: Re: [Zope] need advice on mass data processing

--On 8. Januar 2007 19:28:32 -0800 Allen Huang [EMAIL PROTECTED] wrote:

  I have a data file that has over 11 entry of 3 column data (string,
  float, float)
  currently I have written my program so it will do an entry by entry
  processing with zope. This operation is like this
  1. read data (the data file)
  2. create product (a python product that store three field data: one
  string and two float data) 3. update product (update the three field
  entries)

Please name things the right way. A Product is basically a Zope/Python
package that contains definitions of classes, scripts, templates etc.

You mean instances of a particular class?

 
  when I first tried it out with the first 1000 entries it took about 30
  seconds. That means its going to take 50 ~ 60 minutes for 11 entries.

You're creating 110k instances for storing a string and two floats?
If yes, that's stupid idea.

You can persistent large amounts of data within a single instances
by using Zope BTrees.

  It not every day that you have to process over 11 data entries but
  processing over 60 minutes is still kind of long.
 

What kind of processing?

-aj


__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com




___
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 )


--
John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] Isn't DTML more like what other frameworks do?

2007-01-08 Thread John Schinnerer

Aloha,

Mark, Jonathan (Integic) wrote:

What does matter is that DTML is very similar to RHTML (as in Ruby On
Rails), ASP, etc. ZPT requires a new way of thinking. I would much
rather convert RHTML to or from DTML than to or from ZPT.

So I don't really get the benefit of using ZPT. The fact that no one
outside of Zope seems to have created a ZPT-like solution suggests to
me that ZPT, as I said, solves a problem which doesn't exist. 


As mentioned other frameworks use TAL/METAL (the basis for ZPT; bear in 
mind ZPT is a zope-specific use of TAL and METAL) - I have worked with 
Roundup a bit and it was a joy to see that it used TAL for template 
language.


One major factor nobody has mentioned yet is that TAL/METAL offers much 
better ability to separate logic, presentation and content.
By their very nature HTML-munging template markups violate this 
well-known (if not well-respected ;-) design principle.


The WYSIWYG editor thing is merely a side benefit of markup that is both 
XML compliant and cleanly separates logic, presentation and content.


I suspect that nobody else created TAL because it is easier to go with 
what one is familiar/comfortable with - HTML-munging - than to break new 
ground, even when the new ground is better in both design and practice.


Sure DTML is more like PHP and ASP and Ruby/Rails' HTML munge and 
Alfresco's HTML munge and so on (whatever they're called). As my grandma 
used to say, if everyone were jumping off a cliff, would you do it too 
just because they were?

;-)

cheers,
John S.

--
John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] saving/creating an object to an exsisting folderish object

2007-01-07 Thread John Schinnerer

Aloha,

Allen Huang wrote:


Will... I just found out that I'm suppose to migrate to ZPT. But, I 
start with DTML to begin with and I've be doing it for the past two 
years, so it's kind hard for me to move on to xml and ZPT right off the 
bat.
 
But the tag:attribute structure still confuses me.


I started using zope right about when TAL/ZPT was fully rolled out 
(2.4.x or so)...to me the dtml structure is confusing as heck to look 
at...it's all relative... :-)

Go for it, make the switch, eventually you'll be really glad you did.
Not the least because almost nobody is going to help you with dtml any 
more...!

TAL is not easy reading for me either but it sure beats the alternatives.
I am easily disappointed by other web dev platforms that despite all 
kinds of other sophistication (ruby-rails, alfresco etc.) still keep 
using or creating yet one more HTML-munging template language.

I mean, how 20th century is that?

cheers,
John S.

--
John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] Correct location for robots.txt in virtual-hosted zope sites?

2006-12-09 Thread John Schinnerer

Thank you,

Doh!
Far too obvious for my tired late-night brain!

John S.

Jens Vagelpohl wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 9 Dec 2006, at 07:42, John Schinnerer wrote:

Do robots correctly find a file object named  'robots.txt' (containing 
text specifying the desired robot rules)  if it is put in the root 
folder for a zope site v-hosted behind  apache?



You could have found out in a split second by creating a robots.txt  and 
then visiting http://my.site/robots.txt with a browser...


jens



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFepHrRAx5nvEhZLIRAsUWAJ9Iz2rU1WZoj2q3VCxuREAbbwU4SgCeJ354
DSrOjafh7RfLHelFscq+hzo=
=ftlv
-END PGP SIGNATURE-
___
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 )



--
John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


[Zope] Correct location for robots.txt in virtual-hosted zope sites?

2006-12-08 Thread John Schinnerer

Aloha,

I have not been able to google up an answer to this, not for zope sites 
v-hosted behind apache anyhow.


Do robots correctly find a file object named 'robots.txt' (containing 
text specifying the desired robot rules) if it is put in the root folder 
for a zope site v-hosted behind apache?


For example apache points all requests for http://siteone.com/ to a 
folder named siteone.com in my zope 2.8.8 instance.


If I put a robots.txt file in the siteone.com folder in zope, do the 
robots find it, as they would if it were a simple static HTML site?


If not...how is this handled for zope sites v-hosted behind apache?

thanks,
John S.

--
John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] Zope 2.9 Product Refreshing

2006-08-07 Thread John Schinnerer

Aloha,


Refresh always works, at least the explicit refresh (do not know
about the automatic one which I have never used).


I'm on 2.7 and yes, the explicit and *very* useful refresh tab in the 
ZMI seems to work fine in production mode also.


I do not remember fondly the old days (2.4, 2.5) of having to restart 
zope for every little product change/tweak/debug effort during 
development, or when doing a minor product upgrade to production server.


I was going to upgrade to 2.9 very soon but now may go only to 2.8.
I don't have the technical chops to work on a refresh solution in 2.9+, 
however I heartily support such efforts from those of you who also see 
it as an important issue.


cheers,
John S.


--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] Zope 2.9 Product Refreshing

2006-08-07 Thread John Schinnerer
Since I never knew the refresh tab was a fragile hack, it always worked 
fine for me... :-)


Are you saying that a really good solution for this is in the hands of 
python developers, not zope developers?
In that case it seems far off, if ever, since zope is only one of many 
many applications using python.

I would settle for another fragile hack that works, I guess.
The volume of posts so far would seem to indicate that it's not a 
trivial topic...


John S.

Chris McDonough wrote:
The real effort towards making a better refresh should likely be  
spent at the level of the Python interpreter.  The dynamic nature of  
Python is the thing that allows for a refresh in the first place,  but 
the implementation of Python object references limits its  usefulness.


The implementation of reload could be vastly improved by changing  
Python internally to allow for a sort of mark-and-sweep reload that  
could traverse an object graph full of references between an object  and 
the modules that it is declared in.  Anything else will likely be  too 
fragile to work in all cases.


On Aug 7, 2006, at 4:36 PM, John Schinnerer wrote:


Aloha,


Refresh always works, at least the explicit refresh (do not know
about the automatic one which I have never used).



I'm on 2.7 and yes, the explicit and *very* useful refresh tab in  the 
ZMI seems to work fine in production mode also.


I do not remember fondly the old days (2.4, 2.5) of having to  restart 
zope for every little product change/tweak/debug effort  during 
development, or when doing a minor product upgrade to  production server.


I was going to upgrade to 2.9 very soon but now may go only to 2.8.
I don't have the technical chops to work on a refresh solution in  
2.9+, however I heartily support such efforts from those of you who  
also see it as an important issue.


cheers,
John S.


--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )





--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] ZSQL Method Question

2006-07-19 Thread John Schinnerer

Aloha,

I think so, for the moment anyhow!
Thanks all,
John S.

Cliff Ford wrote:
Comment on Peter's suggestion: I am no expert on these things, but it is 
my understanding that for MySQL LAST_INSERT_ID() fetches the last 
autoincrement value made by the current insert, so the outcome is not 
affected by virtually simultaneous requests. And I don't think MySQL 
accepts a value for the autoincrement key. I am a bit surprised that the 
code you quote is reliable - surely there is a possibility of an insert 
after calling GetNextID and before calling SQLInsert in the python code?


Comment on Tino's suggestion: I think that LAST_INSERT_ID() is MySQL 
specific and I guess CURRVAL() is Postgres specific. But the principle 
is the same: calling within the same Z SQL Method ought to be safe.


Anyway, I hope John has had is question answered.

Cliff

Tino Wildenhain wrote:


Peter Bengtsson wrote:


What if you have 1,000,000 requests/sec?
What if between the INSERT and the LAST_INSERT_ID() another INSERT is 
made?


I use PostgreSQL and with postgres you can always ask the sequence what
the next id is going to be. It goes something like this::

next_id = context.GetNextId()[0].next_id
context.SQLInsertUser(uid=next_id, name='Peter')

where 'GetNextId' is a ZSQL method that looks like this::

params/params
SELECT NEXTVAL('users_uid_seq') AS next_id




Its even easier:
one ZSQL Method:

INSERT INTO foo (foo_id,blah,bar) VALUES
(nextval('foo_foo_id_seq'),dtml-sqlvar blah ... );
SELECT CURRVAL('foo_foo_id_seq') as foo_id;

But your above solution is valid too.

Regards
Tino
___
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 )


___
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 )



--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] question on simple_send in MailHost

2006-07-19 Thread John Schinnerer

Aloha,

Thanks all for the suggestions...for the time being I can do what I need 
by sending to only one address.
It was trying to test the send by sending to multiple addresses (mine 
and others') that brought this out...

I will try a list next time I need multiple addresses in the To: field.

thanks,
John S.

Jonathan wrote:


- Original Message - From: John Schinnerer [EMAIL PROTECTED]
To: zope@zope.org
Sent: Sunday, July 16, 2006 11:49 PM
Subject: [Zope] question on simple_send in MailHost



Aloha,

The Zope (2.7.5) API docs for MailHost show this for simple_send:

--
simple_send(self, mto, mfrom, subject, body):

Sends a message. Only To:, From: and Subject: headers can be set. 
The arguments are:


mto
A commaseparated string or list of recipient(s) of the message.
mfrom
The address of the message sender.
subject
The subject of the message.
body
The body of the message.
--

So it reads like it can handle more than one To: address, something 
like this comma-separated string:


'[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]'

...but when I do this the message only gets sent to the first address 
in the list.




I have never used simple_send..., but have you tried putting the 'To' 
addresses in a list format, eg. ['addr1', 'addr2', ...]?  - if you 
already have a comma-separated string you can easily pass this as a list 
with something like:  string.split(addressString, ',').



Jonathan

___
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 )



--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] question on simple_send in MailHost

2006-07-19 Thread John Schinnerer

Aloha,

I did try send() - it seems one must know something about RFC822 message 
formatting to use it...?
I know nothing about that, and could not quickly find any clear and 
concise howtos or tutorials, just verbose and confusing specs and 
mailing list posts and so on.


I tried using send() with the same plain text body and from and to 
strings I was using for simple_send()...in case it might work...
When the mail arrived, some of the header content was in the body and 
not in the header.

It did arrive at all addresses in the To: field, I will admit... :-)
But the header was broken somehow, I assume because I didn't know how to 
format it correctly.

That was all the time I had to mess with it for now.

thanks,
John S.

Andreas Jung wrote:



--On 18. Juli 2006 21:23:59 -1000 John Schinnerer [EMAIL PROTECTED] 
wrote:



Aloha,

Thanks all for the suggestions...for the time being I can do what I need
by sending to only one address.
It was trying to test the send by sending to multiple addresses (mine and
others') that brought this out...
I will try a list next time I need multiple addresses in the To: field.



Why don't you use the send() method which works perfectly fine with 
multiple

recipient addresses???

-aj





___
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 )


--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] ZSQL Method Question

2006-07-18 Thread John Schinnerer


Aloha,

Is this even easier solution only for postgreSQL, or is it for MySQL?
I am going to have to start working with integrating MySQL into 
zope-based stuff soon so I'm trying to get a head start... :-)


thanks,
John S.

Tino Wildenhain wrote:

Peter Bengtsson wrote:


What if you have 1,000,000 requests/sec?
What if between the INSERT and the LAST_INSERT_ID() another INSERT is made?

I use PostgreSQL and with postgres you can always ask the sequence what
the next id is going to be. It goes something like this::

next_id = context.GetNextId()[0].next_id
context.SQLInsertUser(uid=next_id, name='Peter')

where 'GetNextId' is a ZSQL method that looks like this::

params/params
SELECT NEXTVAL('users_uid_seq') AS next_id



Its even easier:
one ZSQL Method:

INSERT INTO foo (foo_id,blah,bar) VALUES
(nextval('foo_foo_id_seq'),dtml-sqlvar blah ... );
SELECT CURRVAL('foo_foo_id_seq') as foo_id;

But your above solution is valid too.

Regards
Tino
___
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 )



--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


[Zope] question on simple_send in MailHost

2006-07-16 Thread John Schinnerer

Aloha,

The Zope (2.7.5) API docs for MailHost show this for simple_send:

--
simple_send(self, mto, mfrom, subject, body):

Sends a message. Only To:, From: and Subject: headers can be set. 
The arguments are:


mto
A commaseparated string or list of recipient(s) of the message.
mfrom
The address of the message sender.
subject
The subject of the message.
body
The body of the message.
--

So it reads like it can handle more than one To: address, something like 
this comma-separated string:


'[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]'

...but when I do this the message only gets sent to the first address in 
the list.


Is this a mistake in the docs - do I need to use send() to send to 
multiple addresses?


Or is there something wrong with my comma-separated string of recipients?

Or is there a third possibility I haven't even considered... :-)

thanks,
John S.

--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


[Zope] Improved Zope Org Proposal

2006-06-26 Thread John Schinnerer

Aloha,

...

 I start to understand:

   You want to have a narrow, a focused site
   because you fear that a bigger one cannot be managed.

 In such a case, I would say: start with the small solution
 and maybe get bigger later.


This is a basic principle of design that works (as opposed to design
that fails to work).
Start small and work the edges outwards.
The work edges outwards that works is often modular in nature (perhaps
a.k.a. 'micro-sites').
That doesn't mean it can't look-and-feel like one big site as access
point.

Biting off more than one (person, organization, whatever) can chew
usually results in choking...

So I actually see a lot of agreement in what may appear to be argument.

Also:

I agree that despite the wonders of zope, the zope.org site is not as
stunning a place to refer people to as it could be. For the most general
public face of the site, I support the idea of a clear and simple
brochure-like approach.
A couple major open source project/product sites that I am excited about
referring people to:

http://rubyonrails.org
http://www.mozilla.com

...and to some extent

http://www.openoffice.org

...although IMO the OO site is not quite as clear and well-designed as
the other two...better than zope.org though.
Also bearing in mind that the Ruby On Rails site is for a development
platform while Mozilla and OO are end-user app sites - somwhat different
audiences.

cheers,
John S.



--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] Improved Zope Org Proposal

2006-06-24 Thread John Schinnerer

Aloha,

As an occasional user of the zope.org site I'll present my typical use 
case, as that's what matters most to me... :-D


I go there normally for one of two reasons:

1) to slog through available products to see if I can find something to 
suit a development need I have


2) to slog through HowTos and documentation and tips and the like to try 
and solve some issue I can't figure out or learn how to do something I'm 
trying to do first time or differently etc.


On the one hand, there is a lot of completely and nearly obsolete 
content that turns up in both these cases, thus my use of the word slog...


On the other hand, I do sometimes find just what I need somewhere in all 
of what's there...and it's not usually easy.
And, sometimes, it's somewhere in all that bit-rot that will no longer 
be supported...so I guess there will be less cruft and, hopefully, not 
too much less useful information in the new site?


What I would really appreciate on a new zope.org site would be an 
improved search functionality.  Something that lets me filter out all 
but certain types of objects would be great.  If I'm searching for a 
product, I only want to see hits on relevant product objects or directly 
related objects that will clearly point me to a product (like a product 
review, if there is to be such a thing)...likewise for HowTos, etc. 
etcinstead of as now where I get back all kinds of objects that 
happen to be hit by my search string even when most of them are 
irrelevant types of objects.


And thanks to everyone working on making a new site happen!

cheers,
John S.

--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


[Zope] When is an empty list not an empty list?

2006-06-18 Thread John Schinnerer

Aloha,

I have a python script, getCatalogItems(), which returns a (possibly 
empty) list resulting from a catalog query. The lone parameter is the 
sort index; the rest of the query is taken from the request. Anyhow...

If nothing was found, I don't want to display an empty table of results.

When I do this query and then check for empty list to see if the query 
returned any items:


div tal:define=items python:container.getCatalogItems('id')
table tal:condition=python: items!=[]
...

...it doesn not work, that is, the (empty) table displays when items is 
in fact an empty list.


If I do this instead:

div tal:define=items python:container.getCatalogItems('id')
table tal:condition=python: len(items)0
...

...then the condition works, no empty table is displayed if the list is 
empty.


Why does the former not work and the latter does?
I need to understand the difference in the python expressions...makes no 
sense to me at present that they don't work the same.


thanks for any help,
John S.

--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


[Zope] questions on multilingual sites

2006-06-18 Thread John Schinnerer

Aloha,

I'm currently doing a custom small business site that might also want to 
be in French further down the road.


I've never used the internationalization aspects of zope yet...so a few 
basic questions:


Can additional language support be added in later, or is it necessary to 
build it all in from the start (even if not used yet)?


What are the basic docs/tutorials/howtos I should look at to start 
understanding how zope language support works and how to best apply/use it?


thanks for any assistance,
John S.


--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] When is an empty list not an empty list?

2006-06-18 Thread John Schinnerer

Aloha,

Thanks, I understand...though it's a bit annoying that it looks and acts 
just like a list but isn't...


Just using items does work.  I figured it would work for True when not 
empty...I wasn't so sure what it would return when empty, as sometimes 
the test seems to be on 'exists' rather than 'empty', depending on the 
type of object.


At least I grok this particular case now, thanks again...
cheers,
John S.

Tino Wildenhain wrote:

John Schinnerer wrote:


Aloha,

I have a python script, getCatalogItems(), which returns a (possibly
empty) list resulting from a catalog query. The lone parameter is the
sort index; the rest of the query is taken from the request. Anyhow...
If nothing was found, I don't want to display an empty table of results.

When I do this query and then check for empty list to see if the query
returned any items:

div tal:define=items python:container.getCatalogItems('id')
table tal:condition=python: items!=[]
...

...it doesn not work, that is, the (empty) table displays when items is
in fact an empty list.

If I do this instead:

div tal:define=items python:container.getCatalogItems('id')
table tal:condition=python: len(items)0
...

...then the condition works, no empty table is displayed if the list is
empty.

Why does the former not work and the latter does?
I need to understand the difference in the python expressions...makes no
sense to me at present that they don't work the same.



Well, thats because getCatalogItens() does not return a list. It might
look and work like it, but it isnt the same class. Python defines
comparisions between different classes as always false.

Easier in your case would be just:

tal:condition=items

non empty python objects are usually logically True.

Regards
Tino
___
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 )



--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


[Zope] How to set selected items in multi-select list from lines property

2006-06-04 Thread John Schinnerer

Aloha,

I have an add form where a user can add an object.
In one part of the form, the user selects zero or more options from a 
multiple select list.
The selected options populate a lines property of the object when the 
object is added.


I also have an edit form where the user can later edit these same 
objects they've created. They can use the same multiple select list to 
change the selected options.
Of course the previously selected options (in the lines property) need 
to be displayed as such when they first visit the edit form.  So...


I need to know how to display the multiple-select list in the edit 
form so that the options currently in the lines property are set as 
selected.


I suspect there is some very slick way to do this, maybe with TAL alone...?

So far I am only coming up with what seem to be cumbersome solutions 
that have unecessary overhead (comparing a list option with every 
element in lines property via python script to see if it should be set 
selected, and repeating for every list option)...is there a better way?


Any help appreciated.

thanks,
John S.

--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


[Zope] Re: [Zope-Annce] [Ann] Zope 2.8.7 released

2006-05-29 Thread John Schinnerer

Aloha,

I was just preparing to move to 2.8.6 (from 2.7.5).
A big part of my moving to 2.8.x is for supporting plone 2.1.x.

Is 2.8.7 still fine with plone 2.1.x?
Yes I am asking on plone list also...want to know from both sides of the 
equation... :-)


thanks,
John S.

Andreas Jung wrote:


Hi all,

on behalf of Zope Corporation and the Zope community I am pleased to 
announce the release of Zope 2.8.6.  You can download Zope 2.8.7 from


 http://www.zope.org/Products/Zope/2.8.7/


Some new features of Zope 2.8:

  - ZODB 3.4 with MVCC (multi version concurrency control) support.
MVCC solves nearly every problem with ZODB read-conflict errors
which is very important for high-traffic Zope sites.

  - Extension Classes were rewritten as Python new-style classes making
all features of Python new-style classes available in Zope
objects. This includes support for cyclic garbage collection.

  - Integration of Zope 3 technologies through Five (see 
http://codespeak.net/z3/five/)



For more information on what is new in this release, see the
CHANGES.txt files for the release:

 http://www.zope.org/Products/Zope/2.8.7/CHANGES.txt

See also:

 http://www.zope.org/Wikis/DevSite/Projects/Zope2.8/OverView

Please bring all the bugs you have found to the Zope bugtracker:

  http://collector.zope.org/Zope:http://collector.zope.org/Zope

For more information on the available Zope releases, guidance for selecting
the right distribution and installation instructions, please see:

  http://www.plope.com/Books/2_7Edition/InstallingZope.stx

Please also keep in mind that Zope 2.8.7 requires Python 2.3.5. Zope 2.8.7
is not certified for any Python 2.4.x versions. So using Python 2.4 is 
neither recommended nor supported and any related questions or problems 
are likely to be ignored until 2.4 is an officially supported Python 
version for Zope.





___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

  Zope-Announce for Announcements only - no discussions

(Related lists - 
 Users: http://mail.zope.org/mailman/listinfo/zope

 Developers: http://mail.zope.org/mailman/listinfo/zope-dev )


--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


[Zope] Looking for current shopping cart product

2006-05-27 Thread John Schinnerer

Aloha,

I am wondering if there is any current and stable shopping cart products 
for zope (2.7.5 is my current live version).

I have a custom merchandise product for a client's business site.
Retail sales are already handled via their PayPal merchant account. The 
retail items only need the appropriate PayPal button/form code and 
PayPal handles the rest.


However the client also does wholesale, but not via PayPal, and wants a 
wholesale cart into which a wholesale buyer can put items and 
quantities to submit for review, final pricing, and shipping costs.


I have just looked on zope.org and under products - commerce I don't 
find anything that looks current.


I searched zope.org also and didn't find anything.
I googled around a bit for zope shopping cart product and simliar and 
still didn't find anything that looked viable.


Is there anything out there?
If so why is it so hard to find?  ;-)

thanks,
John S.

--

John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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 )


Re: [Zope] Re: Using ReStructuredText instead of StructuredDocument inside ZPT

2006-02-26 Thread John Schinnerer
Aloha,

Thanks for pointing me to that document, that's what I needed.

The example for TAL integration works just fine (with the typo fixed
:-), and also renders only the actual content, without adding the whole
XHTML document structure around it.

cheers,
John S.

 In your Zope distribution files look at 'doc/RESTRUCTUREDSTEXT.txt'
 (or 
 'Zope/doc/RESTRUCTUREDSTEXT.txt' with Zope2.9).
 
 It has examples of how to use ReST with different solutions.
 (There is a typo: 'restructured_test' should read 'restructured_text'
 )
 
 Btw, the ZReST objects method 'source_txt' gets you the source text
 of 
 the reST document.
 
 E.g. this should work in your example:
 
 p
tal:define=rest_txt 
 python:container.client_content.some_STX_object.source_txt()
tal:replace=structure python: 

modules['Products.PythonScripts.standard'].restructured_text(rest_txt)
 /
 
 
 Hth, Michael
 
 -- 
 http://zope.org/Members/d2m
 http://planetzope.org
 
 ___
 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 )
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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 )


Re: [Zope] Using ReStructuredText instead of StructuredDocument inside ZPT

2006-02-25 Thread John Schinnerer
Aloha,

 huh? You should be able to extend the expression above by calling
 the objects render method?
 
  p tal:content=structure
 container/client_content/some_STX_object/render

OK, tried that - I get a username/password prompt that won't take
anything as authorized, and I end up with this error:
-
Site Error

An error was encountered while publishing this resource.

Error Type: Unauthorized
Error Value: You are not allowed to access 'render' in this context
--

I can post the full trace if needed, seems like overkill at this point
as I assume it's some kind of general security thing with ReST Document
that I simply don't know about.

So now what?
Even the zope instance root/owner username and PW are not accepted...??

If it's to be useful to me I need it to just render for Anonymous as
it's part of public site content.

thanks,
John S.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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 )


Re: [Zope] Using ReStructuredText instead of StructuredDocument inside ZPT

2006-02-24 Thread John Schinnerer
Hello,

OK, that makes sense in general - and what would that look like in my
ZPT code?  Can I access that method with just TAL, similar to
Structured Document example:

p tal:content=structure container/client_content/some_STX_object
STX content renders here
/p

...except with the render() in the path somewhere - where?

Or do I have to use a python expression, and if so what would that look
like?

The only documentation I can find so far is the user documentation...

thanks,
John S.

--- Andreas Jung [EMAIL PROTECTED] wrote:
 
 --On 23. Februar 2006 23:18:06 -0800 John Schinnerer 
 [EMAIL PROTECTED] wrote:
 
  This is on zope 2.7.5 with the ZReST that comes built in.
  A RSTD called directly (instead of inside a ZPT as above) renders
 as
  expected.
 
 
 Try using the 'render()' method.
 
 -aj


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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 )


[Zope] Using ReStructuredText instead of StructuredDocument inside ZPT

2006-02-23 Thread John Schinnerer
Hello,

I have been using the Structured Document (SD) product with page
templates (to provide some content sections that a client can edit
using structured text).

Now I would like to use ReStructuredText Document (RSTD) instead of SD.

I have been using code like this in a page template to render the
content of a SD within the page template:

...
div metal:fill-slot=pagebody

p tal:content=structure container/client_content/vision_statement
Vision Statement
/p

/div !-- end of page body slot --
...

...where vision_statement is a SD object.

I expected that this would work the same if vision_statement were a
RSTD object...however it does not.  
What displays is only the unrendered, plain text content of the RSTD.

Can I use a RSTD object in the same way I have been using a SD?

If so, how do I get it to render?

This is on zope 2.7.5 with the ZReST that comes built in.
A RSTD called directly (instead of inside a ZPT as above) renders as
expected.

thanks,
John S.




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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 )


[Zope] Backing out the Zope Hotfix 2005-10-09 that broke my zope 2.7.5

2005-10-13 Thread John Schinnerer
Aloha,

FWIW here's what I found while backing out the hotfix on my zope 2.7.5:

The hotfix-installed files are set to an owner, group and perms that do
not work with an existing install (zope fails to start up
completely/correctly).  I don't know if there are other problems also,
but that was the relevant issue for me.

More importantly, and more annoyingly for trying to back out, the
owner, group and perms for the Products folder is altered to the same
dysfunctional settings!

I use debian, so I simply tried to reinstall the zope2.7 debian package
to get the pre-hotfix files back.
First I got some explicit errors on the hotfix-installed files that
pointed me to the owner/group/perms problems with those.

Then the debian package *appeared* to install, but zope still failed to
actually start once installed and configured.

It took me a while to notice that the owner/group/perms on the Products
folder itself had been changed to the same settings, blocking
correct/complete reinstall of the original files.

Unfortunately the package install didn't raise any errors on this.

Once I fixed the messed-up perms on the Products folder and did the
install again, all was well.

I put this info on the hotfix alert comments also.

John S.

--- John Schinnerer [EMAIL PROTECTED] wrote:

 Aloha,
 
 I just applied the below hotfix as directed to a zope 2.7.5
 installation on my development machine.
 
 It broke something bad, now the browser just says
 
 The connection was refused when attempting to contact localhost:9673
 
 I cannot access the ZMI nor any site pages, not on localhost:9673 nor
 on 127.0.0.1:9673
 
 That is the port it was installed and had been working on.
 I did nothing but install the hotfix as directed on the linked page
 below.
 
 I have completely restarted the machine.
 At boot time the messages indicate that zope started fine, as usual.
 
 Any help appreciated, the sooner the better.
 
 thanks,
 John S.
 
 --- Andreas Jung [EMAIL PROTECTED] wrote:
 
  Hello,
  
  a security issue with the Docutils package coming with Zope 2.6 or
  higher 
  has been discovered. Sites that expose reStructuredText
 functionality
  to
  untrusted users (typically portal sites allowing registered users
 to
  edit 
  content) are possibly affected.
  
  Download location and installation are available from
  

 http://www.zope.org/Products/Zope/Hotfix_2005-10-09/security_alert
  
  The hotfix is supposed to work with any Zope 2.7 and 2.8 version.
  It might work for Zope 2.6 and Python 2.1 but we can not give a
  guarantee 
  since Zope 2.6 is no longer maintained. Plone sites do not seem to
 be
  
  affected (there seems to be some additional code on top of Zope's
  reST implementation avoiding the failure) however this not a
  guarantee.
  The upcoming Zope 2.8.2 and 2.7.8 releases will also ship with the
  hotfix.
  
  
  Andreas Jung
  
   ___
  Zope-Announce maillist  -  Zope-Announce@zope.org
  http://mail.zope.org/mailman/listinfo/zope-announce
  
Zope-Announce for Announcements only - no discussions
  
  (Related lists - 
   Users: http://mail.zope.org/mailman/listinfo/zope
   Developers: http://mail.zope.org/mailman/listinfo/zope-dev )
  
 
 
 
   
 __ 
 Yahoo! Music Unlimited 
 Access over 1 million songs. Try it free.
 http://music.yahoo.com/unlimited/
 ___
 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 )
 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
___
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 )


Re: [Zope] Re: Zope Hotfix 2005-10-09 broke my zope 2.7.5

2005-10-12 Thread John Schinnerer
Aloha,

Well, according to a comment on the hotfix page on problems with
applying it to 2.7.0, which was posted after I had already killed my
2.7.5 by applying it, there are some issues which might break it
on/during startup, such as config file items expected but not present
for at least one of the affected products, perms issues, etc.

JohnS.

--- Andreas Jung [EMAIL PROTECTED] wrote:

 --On 10. Oktober 2005 20:21:10 -0700 John Schinnerer 
 [EMAIL PROTECTED] wrote:
 
  Aloha,
 
  I just applied the below hotfix as directed to a zope 2.7.5
  installation on my development machine.
 
  It broke something bad, now the browser just says
 
  The connection was refused when attempting to contact
 localhost:9673
 
  I cannot access the ZMI nor any site pages, not on localhost:9673
 nor
  on 127.0.0.1:9673
 
  That is the port it was installed and had been working on.
  I did nothing but install the hotfix as directed on the linked page
  below.
 
  I have completely restarted the machine.
  At boot time the messages indicate that zope started fine, as
 usual.
 
 When Zope does not respond to requests as stated then there has been 
 something during the startup phase of phase. I do not believe that
 the patch
 causes a startup problem. If it does then you applied it the wrong
 way or 
 you are not telling us all details in terms of error messages
 happening 
 during startup.
 
 -aj
 
 
  ___
 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 )
 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
___
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 )


[Zope] Re: Zope Hotfix 2005-10-09 broke my zope 2.7.5

2005-10-10 Thread John Schinnerer
Aloha,

I just applied the below hotfix as directed to a zope 2.7.5
installation on my development machine.

It broke something bad, now the browser just says

The connection was refused when attempting to contact localhost:9673

I cannot access the ZMI nor any site pages, not on localhost:9673 nor
on 127.0.0.1:9673

That is the port it was installed and had been working on.
I did nothing but install the hotfix as directed on the linked page
below.

I have completely restarted the machine.
At boot time the messages indicate that zope started fine, as usual.

Any help appreciated, the sooner the better.

thanks,
John S.

--- Andreas Jung [EMAIL PROTECTED] wrote:

 Hello,
 
 a security issue with the Docutils package coming with Zope 2.6 or
 higher 
 has been discovered. Sites that expose reStructuredText functionality
 to
 untrusted users (typically portal sites allowing registered users to
 edit 
 content) are possibly affected.
 
 Download location and installation are available from
 
http://www.zope.org/Products/Zope/Hotfix_2005-10-09/security_alert
 
 The hotfix is supposed to work with any Zope 2.7 and 2.8 version.
 It might work for Zope 2.6 and Python 2.1 but we can not give a
 guarantee 
 since Zope 2.6 is no longer maintained. Plone sites do not seem to be
 
 affected (there seems to be some additional code on top of Zope's
 reST implementation avoiding the failure) however this not a
 guarantee.
 The upcoming Zope 2.8.2 and 2.7.8 releases will also ship with the
 hotfix.
 
 
 Andreas Jung
 
  ___
 Zope-Announce maillist  -  Zope-Announce@zope.org
 http://mail.zope.org/mailman/listinfo/zope-announce
 
   Zope-Announce for Announcements only - no discussions
 
 (Related lists - 
  Users: http://mail.zope.org/mailman/listinfo/zope
  Developers: http://mail.zope.org/mailman/listinfo/zope-dev )
 




__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
___
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 )


[Zope] FYI on Debian 3.1/zope Re: Images too (StructuredDocument size limit reduced after 2.5.1 to 2.7.5 upgrade)

2005-09-08 Thread John Schinnerer
Aloha,

  That was what I needed, the parameter name...my sysadmin set it low
  for security reasons, not realizing

 Clueless overly paranoid sysadmins strike again ;-)

No actually, he's very clueful and security-conscious, and I was
mistaken about how it got set that low, it appears to be a debian
package default setting.

FYI anyone upgrading to the recent Debian 3.1 release (sarge), the
default in the config file in the zope package (2.7.5 final) in sarge
has cgi-maxlen set quite low, 1 if I recall correctly, to block
potential DOS attacks according to the comment on the setting (Debian
is perhaps a bit paranoid in this case...).

So a default debian upgrade will leave you with a very small cgi-maxlen
in the zope config file - be sure to check it and change it if needed.

cheers,
John S.



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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 )


Re: [Zope] Images too (StructuredDocument size limit reduced after 2.5.1 to 2.7.5 upgrade)

2005-09-07 Thread John Schinnerer
Aloha,

OK, it's not just StructuredDocument objects, Image objects have the
same problem, anything over about ~5-8K gets the same error message. 
Probably everything will, those are just the ones that have emerged
first for me...

Does anyone know what could be causing this?
If it's some new configuration option(s) for 'content length' in 2.7.5,
where the heck do I find and tweak them?
I don't see anything in the ZMI that would affect this, don't know
where else to look.

thanks,
John S.

 To recap, my server was upgraded from zope 2.5.1 to 2.7.5 and now
 StructuredDocument objects in a product I have built have a rather
 small limit (about 4-6K) on how much content can be put into them.
 The content is being put into them from content in a web form text
 area
 using a call like
 
 self.some-structured-document-object.manage_edit(REQUEST.stx-content,
 'Name of Content')
 
 Nothing in the product was touched/changed, just the zope upgrade.
 
 The error message now returned in the browser window when I try and
 update a structured document with more than ~4-6K of content via web
 form is this:
 
 --
 
 Site Error
 
 An error was encountered while publishing this resource.
 
 Error Type: ValueError
 Error Value: Maximum content length exceeded
 
 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
 error log.
 
 If the error persists please contact the site maintainer. Thank you
 for
 your patience. 
 
 --
 
 This error is *not* showing up in the error log viewable from the
 root
 of the zope instance.
 
 thanks,
 John S.





__
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/
___
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 )


Re: [Zope] Re: Images too (StructuredDocument size limit reduced after 2.5.1 to 2.7.5 upgrade)

2005-09-07 Thread John Schinnerer
Hello,

 As Dieter already said, this is due to you having cgi-maxlen or 
 http-header-max-length (when using GET) set too low in etc/zope.conf.

That was what I needed, the parameter name...my sysadmin set it low for
security reasons, not realizing it would impact my content editing
products, he will bump it up and hopefully that will fix this.

thanks,
John S.





__
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/
___
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 )


[Zope] StructuredDocument size limit reduced after 2.5.1 to 2.7.5 upgrade

2005-09-06 Thread John Schinnerer
Aloha,

 did you use POST or GET? If yoou use GET, use POST. If you use POST,
 then I dont know.

Using POST, and I don't know either...

Anyone else have any ideas?

To recap, my server was upgraded from zope 2.5.1 to 2.7.5 and now
StructuredDocument objects in a product I have built have a rather
small limit (about 4-6K) on how much content can be put into them.
The content is being put into them from content in a web form text area
using a call like

self.some-structured-document-object.manage_edit(REQUEST.stx-content,
'Name of Content')

Nothing in the product was touched/changed, just the zope upgrade.

The error message now returned in the browser window when I try and
update a structured document with more than ~4-6K of content via web
form is this:

--

Site Error

An error was encountered while publishing this resource.

Error Type: ValueError
Error Value: Maximum content length exceeded

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
error log.

If the error persists please contact the site maintainer. Thank you for
your patience. 

--

This error is *not* showing up in the error log viewable from the root
of the zope instance.

thanks,
John S.







__
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/
___
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 )


Re: [Zope] Re: StructuredDocument size reduced after 2.5.1 to 2.7.5 upgrade

2005-09-04 Thread John Schinnerer
Aloha,

  Some Zope version may have introduced a few new configuration
 options
  to control the size of uploaded objects (I see them
  in Zope 2.8.1 after I upgraded from Zope 2.7.1) -- maybe some of
 them are responsible...

Where are they located?  I don't see anything like that in the ZMI for
2.7.5.
Are they in config files (which ones?), or...?

 maybe form trasport method too, see POST vs. GET.

Form transport method is the same as before the upgrade from 2.5.1 to
2.7.5 - I changed nothing in my products or other code, only zope was
upgraded.

Did something about form transport method that would affect
programmatic file upload size change between these two zope versions ?

thanks,
John S.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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 )


Re: [Zope] Re: upgrade 2.5.1 to 2.7.5 causes error in product code

2005-08-30 Thread John Schinnerer
Aloha,

  python:here.sponsors[0] != ''
 
  if the tuple is empty, whereas 2.5.1/2.1.3 must have been returning
  some equivalent of boolean 'false' when the tuple was empty.
 
 No. Python 2.1.3 would have blown up the same way.

Must have been Zope 2.5.1 somehow turning the python blowup into
equivalent of boolean 'false' then, or my clearly less than exemplary
code would have also failed under 2.5.1, as it does under 2.7.5.

  Now I do this
 
  python: (here.sponsors) and (here.sponsors[0] != '')
 
  and it works again.
  The second condition may be redundant now I suppose...?
 
 No it is not redundant. A value ('',) would still be True as far as  
 Python is concerned and would pass the first condition.

Right, thanks!

John S.




Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 
___
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 )


Re: [Zope] Re: StructuredDocument size reduced after 2.5.1 to 2.7.5 upgrade

2005-08-30 Thread John Schinnerer
Hello,

 John Schinnerer wrote:
  I am using StructuredDocument objects in the custom products I am
  migrating to 2.7.5 from 2.5.1.
  
  In 2.7.5 I am now getting an error
  
  Value Error
  Maximum content length exceeded
 ...
  Anyone have any idea why I'm getting this size-related error with
  StructuredDocument only after migrating to 2.7.5?
  And how to fix it, of course... :-?
 
 Sorry, but I cannot reproduce this problem with Zope 2.7.7 and large 
 amounts of text in a StructuredDocument... can you send me a 
 .zexp-Export of a StructeredDocument created with 2.5.1 which shows
 the 
 behavior in 2.7.x? Maybe I'll can reproduce it and find the problem,
 but 
 I don't think that it is related to StructuredDocument, because
 nearly 
 all code is acquired from DTML-Document...

For any StructuredDocument object I have, it breaks at approximately
4490 chars (seems to vary by a few chars - maybe due to how many line
breaks...?).  Less works OK; more returns the above error.

My sysadmin did some serious digging and says the error message I get
appears in

/usr/lib/python2.3/cgi.py, lines # 142,272, and 511

he didn't find anything in the Zope code base that has this message.
So may be a python thing...?
Also says it looks like maxlen is getting mangled somehow (though the
default is unlimited?).

Attached is a zexp of the StructuredDocument object I just used to get
the estimate of where it breaks.

thanks,
John S.




Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

artist_statements.zexp
Description: 1104408661-artist_statements.zexp
___
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 )


[Zope] StructuredDocument size reduced after 2.5.1 to 2.7.5 upgrade

2005-08-27 Thread John Schinnerer
Hello again,

I am using StructuredDocument objects in the custom products I am
migrating to 2.7.5 from 2.5.1.

In 2.7.5 I am now getting an error

Value Error
Maximum content length exceeded

when attempting to save changes (edits) of StructuredDocument objects
with large amounts of content - even when there was no problem with
the same large amount of content in 2.5.1.

This error under 2.7.5 happens if a migrated object already has more
than a certain amount of content in it when I do a TTW edit/update of
the object using e.g.

self.manage_changeProperties(REQUEST)

It also happens at some point when I start adding increasing amounts of
text into a StructuredDocument object that initially has small
amounts of content (small meaning not enough to trigger this error
under 2.7.5). 

I don't know exactly how much is too much.

I do know that it is not very much at all, and certainly far less than
the DTML document basis for a StructuredDocument can hold.

It is also far less than what my StructuredDocument objects *already
hold* under 2.5.1.

Anyone have any idea why I'm getting this size-related error with
StructuredDocument only after migrating to 2.7.5?
And how to fix it, of course... :-?

thanks,
John S.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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 )


Re: [Zope] Re: upgrade 2.5.1 to 2.7.5 causes error in product code

2005-08-27 Thread John Schinnerer
Hello,

Thanks Tres, looks like zope 2.7.5/python 2.3.5 is triggering a genuine
full-blown error on my code

python:here.sponsors[0] != ''

if the tuple is empty, whereas 2.5.1/2.1.3 must have been returning
some equivalent of boolean 'false' when the tuple was empty.

Now I do this

python: (here.sponsors) and (here.sponsors[0] != '')

and it works again.
The second condition may be redundant now I suppose...?

thanks,
John S.

--- Tres Seaver [EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 John Schinnerer wrote:
  Hello,
  
  I have just migrated some custom products from 2.5.1 to 2.7.5,
 meaning
  from python 2.1.3 to 2.3.5.
  
  I have this bit of code in the index_html page template in the
 product,
  which rendered just fine in zope 2.5.1/python 2.1.3:
  
  span tal:condition=python:here.sponsors[0] != ''
 tal:omit-tag=
  h4Sponsors/h4
  span tal:repeat=line here/sponsors tal:omit-tag=
  h5 tal:content=line /
  /span
  /span
  
  sponsors is a lines property in the custom product, like so:
  
  {'id':'sponsors', 'type':'lines', 'mode':'w'},
  
  Now, in zope 2.7.5/python 2.3.5, I get an error on this part of the
  above code:
  
  python:here.sponsors[0] != ''
  
  as follows:
  
  Exception Type  IndexError
  Exception Value tuple index out of range
  
  Can anyone tell me what's up with this?
  It worked fine in 2.5.1, now it gives this error in 2.7.5...help...
  
  Thanks,
  John S.
  
  And here's the complete...
  
  Traceback (innermost last):
  
  * Module ZPublisher.Publish, line 101, in publish
  * Module ZPublisher.mapply, line 88, in mapply
  * Module ZPublisher.Publish, line 39, in call_object
  * Module Shared.DC.Scripts.Bindings, line 306, in __call__
  * Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
  * Module Products.PageTemplates.PageTemplateFile, line 106, in
  _exec
  * Module Products.PageTemplates.PageTemplate, line 96, in
 pt_render
PageTemplateFile at
  /growingthroughit.org/galleryitems/bg/tw0110/index_html
  * Module TAL.TALInterpreter, line 190, in __call__
  * Module TAL.TALInterpreter, line 234, in interpret
  * Module TAL.TALInterpreter, line 671, in do_useMacro
  * Module TAL.TALInterpreter, line 234, in interpret
  * Module TAL.TALInterpreter, line 694, in do_defineSlot
  * Module TAL.TALInterpreter, line 234, in interpret
  * Module TAL.TALInterpreter, line 636, in do_condition
  * Module Products.PageTemplates.TALES, line 221, in evaluate
URL: index_html
Line 58, Column 0
Expression: PythonExpr here.sponsors[0] != ''
Names:
  
  {'container': GTIGalleryItem at
  /growingthroughit.org/galleryitems/bg/tw0110,
   'context': GTIGalleryItem at
  /growingthroughit.org/galleryitems/bg/tw0110,
   'default': Products.PageTemplates.TALES.Default instance at
  0x40ad2aec,
   'here': GTIGalleryItem at
  /growingthroughit.org/galleryitems/bg/tw0110,
   'loop': SafeMapping instance at 40f297c0,
   'modules':
 Products.PageTemplates.ZRPythonExpr._SecureModuleImporter
  instance at 0x40acccac,
   'nothing': None,
   'options': {'args': ()},
   'repeat': SafeMapping instance at 40f297c0,
   'request': HTTPRequest,
 

URL=http://www.growingthroughit.org/galleryitems/bg/tw0110/index_html,
   'root': Application instance at 4189acb0,
   'template': PageTemplateFile at
  /growingthroughit.org/galleryitems/bg/tw0110/index_html,
   'traverse_subpath': [],
   'user': Anonymous User}
  
  * Module Products.PageTemplates.ZRPythonExpr, line 47, in
 __call__
__traceback_info__: here.sponsors[0] != ''
  * Module Python expression here.sponsors[0] != '', line 1, in
  expression
  * Module AccessControl.ZopeGuards, line 67, in guarded_getitem
  
  IndexError: tuple index out of range
 
 Try the following in your Zope 2.7.x sandbox:
 
   $ bin/zopectl debug
   ...
here = app['growingthroughit.org].galleryitems/bg/tw0110
print here.sponsors
 
 If the output is '()', then your sponsors attribute is an empty
 tuple,
 which would explain the traceback.





Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 
___
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 )


[Zope] upgrade 2.5.1 to 2.7.5 causes error in product code

2005-08-26 Thread John Schinnerer
Hello,

I have just migrated some custom products from 2.5.1 to 2.7.5, meaning
from python 2.1.3 to 2.3.5.

I have this bit of code in the index_html page template in the product,
which rendered just fine in zope 2.5.1/python 2.1.3:

span tal:condition=python:here.sponsors[0] != '' tal:omit-tag=
h4Sponsors/h4
span tal:repeat=line here/sponsors tal:omit-tag=
h5 tal:content=line /
/span
/span

sponsors is a lines property in the custom product, like so:

{'id':'sponsors', 'type':'lines', 'mode':'w'},

Now, in zope 2.7.5/python 2.3.5, I get an error on this part of the
above code:

python:here.sponsors[0] != ''

as follows:

Exception Type  IndexError
Exception Value tuple index out of range

Can anyone tell me what's up with this?
It worked fine in 2.5.1, now it gives this error in 2.7.5...help...

Thanks,
John S.

And here's the complete...

Traceback (innermost last):

* Module ZPublisher.Publish, line 101, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module Shared.DC.Scripts.Bindings, line 306, in __call__
* Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
* Module Products.PageTemplates.PageTemplateFile, line 106, in
_exec
* Module Products.PageTemplates.PageTemplate, line 96, in pt_render
  PageTemplateFile at
/growingthroughit.org/galleryitems/bg/tw0110/index_html
* Module TAL.TALInterpreter, line 190, in __call__
* Module TAL.TALInterpreter, line 234, in interpret
* Module TAL.TALInterpreter, line 671, in do_useMacro
* Module TAL.TALInterpreter, line 234, in interpret
* Module TAL.TALInterpreter, line 694, in do_defineSlot
* Module TAL.TALInterpreter, line 234, in interpret
* Module TAL.TALInterpreter, line 636, in do_condition
* Module Products.PageTemplates.TALES, line 221, in evaluate
  URL: index_html
  Line 58, Column 0
  Expression: PythonExpr here.sponsors[0] != ''
  Names:

{'container': GTIGalleryItem at
/growingthroughit.org/galleryitems/bg/tw0110,
 'context': GTIGalleryItem at
/growingthroughit.org/galleryitems/bg/tw0110,
 'default': Products.PageTemplates.TALES.Default instance at
0x40ad2aec,
 'here': GTIGalleryItem at
/growingthroughit.org/galleryitems/bg/tw0110,
 'loop': SafeMapping instance at 40f297c0,
 'modules': Products.PageTemplates.ZRPythonExpr._SecureModuleImporter
instance at 0x40acccac,
 'nothing': None,
 'options': {'args': ()},
 'repeat': SafeMapping instance at 40f297c0,
 'request': HTTPRequest,
URL=http://www.growingthroughit.org/galleryitems/bg/tw0110/index_html,
 'root': Application instance at 4189acb0,
 'template': PageTemplateFile at
/growingthroughit.org/galleryitems/bg/tw0110/index_html,
 'traverse_subpath': [],
 'user': Anonymous User}

* Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
  __traceback_info__: here.sponsors[0] != ''
* Module Python expression here.sponsors[0] != '', line 1, in
expression
* Module AccessControl.ZopeGuards, line 67, in guarded_getitem

IndexError: tuple index out of range






Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 
___
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 )