Re: [Zope] Problem with Zope

2017-05-31 Thread Andreas Jung
Look at your error_log in the ZMI. Never seen the case that such 
an error would _not_ trigger a complete traceback in the error_log.

-aj


On 5 Jan 2016, at 12:45, Jordan Guerder wrote:

> Hello,
> I discovered Zope, however, I see an error output from one of my clients. 
> Indeed its website appears for a few hours this error message:
>
> Zope Error
> Zope HAS Encountered an error while publishing this resource.
> Error type: IndexError
> Error Value: 0
>
> Server side all seems ok:
> - Apache is up
> - Php fpm is up
> - Mysql is up
>
> The logs do not show me any errors, would you therefore an idea of how I 
> could identify this problem?
>
> Jordan
> ___
> 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 )


signature.asc
Description: OpenPGP digital signature
___
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] Problem with Zope

2016-01-05 Thread Sebastian Tänzer
Hello Jordan,

ZOPE does not rely or use neither PHP nor MySQL (in most cases at least - MySQL 
can be integrated using a database adapter).

Without any further details and trace logs it’s almost impossible to say what 
the reason for this is.

Which ZOPE version is running? You can see the details in the ZOPE control 
panel.

Kind regards
Sebastian

> Am 05.01.2016 um 12:45 schrieb Jordan Guerder :
> 
> Hello,
> I discovered Zope, however, I see an error output from one of my clients. 
> Indeed its website appears for a few hours this error message:
> 
> Zope Error
> Zope HAS Encountered an error while publishing this resource.
> Error type: IndexError
> Error Value: 0
> 
> Server side all seems ok:
> - Apache is up
> - Php fpm is up
> - Mysql is up
> 
> The logs do not show me any errors, would you therefore an idea of how I 
> could identify this problem?
> 
> Jordan
> ___
> 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 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] Problem Understanding URL

2012-07-23 Thread Jared Hall
Tres, I see what you mean. You're saying that the object lookup for a request 
follows a pattern and that the __getitem__ function has a role in that pattern. 
That's fine, but even if this is returning a User object there is still a 
problem. I think we're beyond the point where you can help me though. The 
problem I'm thinking of is that I know that the /Users/asmithS URL resolves to 
a call to index_html method of Users which in this case is just rendering the 
"userView". As I've said the here/Property calls are located in this user view. 
Could this __getitem__ load the user into the context and then still call the 
index_html and return the .zpt?

Thanks
___
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] Problem Understanding URL

2012-07-23 Thread Jared Hall
I don't know why these are creating new threads. And I'm sorry for the 
formatting on that last message.
___
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] Problem Understanding URL

2012-07-23 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/23/2012 03:01 PM, Jared Hall wrote:
> Ok I'd read about those functions a little bit in the Zope 2 book or 
> the Developer's Guide, but they seemed like advanced techniques that I
> probably wouldn't need to understand.
> 
> Back on topic; I ran this awesome command in the terminal:
> 
> grep getitem x=$(find . *.*)
> 
> and turned up some random references to getitem in some dtml code, 
> which I judge to be insignificant. There was also one very interesting
> usage of __getitem__ in the python code itself, and I have to
> investigate the code further to understand what's going on. The
> function definition looks suspiciously like what I would expect to
> find for this 'hijacking' of control:
> 
> def __getitem__(self, key): v=self._getOb(key, None) if v is not None:
> return v if hasattr(self, 'REQUEST'): request=self.REQUEST 
> method=request.get('REQUEST_METHOD', 'GET') if
> request.maybe_webdav_client and not method in ('GET', 'POST'): return
> NullResource(self, key, request).__of__(self) raise KeyError, key
> 
> I read this as: look up the object in the current context and return 
> it. The only problem with this is that I don't see when the object
> gets placed into the proper context for the TAL statements like
> here/FirstName, etc.

There isn't any "hijacking" going on here:  Zope2 uses '__getitem__' by
preference for fetching items from a container (falling back to
'__getattr__').  The "context" for your template (aliased as "here") is
going to be the object found by the publishing traversal:  in this case,
the 'v' returned from that '__getitem__'.


Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlANqV4ACgkQ+gerLs4ltQ7egQCeOdxitDMAxAMD9YBHf5S/aNau
GHwAn0mraihjntJorXFBQ0/dPNs4CWEp
=0ejr
-END PGP SIGNATURE-

___
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] Problem Understanding URL

2012-07-23 Thread Jared Hall
Ok I'd read about those functions a little bit in the Zope 2 book or the 
Developer's Guide, but they seemed like advanced techniques that I probably 
wouldn't need to understand.

Back on topic; I ran this awesome command in the terminal:

grep getitem x=$(find . *.*)

and turned up some random references to getitem in some dtml code, which I 
judge to be insignificant. There was also one very interesting usage of 
__getitem__ in the python code itself, and I have to investigate the code 
further to understand what's going on. The function definition looks 
suspiciously like what I would expect to find for this 'hijacking' of control:

def __getitem__(self, key):
v=self._getOb(key, None)
if v is not None: return v
if hasattr(self, 'REQUEST'):
request=self.REQUEST
method=request.get('REQUEST_METHOD', 'GET')
if request.maybe_webdav_client and not method in ('GET', 'POST'):
return NullResource(self, key, request).__of__(self)
raise KeyError, key

I read this as: look up the object in the current context and return it. The 
only problem with this is that I don't see when the object gets placed into the 
proper context for the TAL statements like here/FirstName, etc.

Thanks for your help already, and any continued guidance is appreciated.
___
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] Problem Understanding URL

2012-07-23 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/23/2012 12:55 PM, Jared Hall wrote:
> I think I have a simple question about how Zope is handling requests.
> My current task is to understand an already-written Zope web
> application.
> 
> One thing I can't wrap my head around is this URL:
> 
> https://mysite.com/UserManagement/Users/asmithS/
> 
> Speaking in Zope terms, the UserManagement object is contained in the 
> top-level product. In the UserManagement object, there is a Users 
> object. That's all fine and dandy, run of the mill, 
> acquisition/containment. However, the Users object has no asmithS 
> object. In fact, asmithS is just a username, which makes the last
> field in the URL essentially a parmeter on the Users object.
> 
> From examining the behavior of the webapp and the code itself, I know 
> that the index_html method of the Users object is what is returned
> from this request, which is a Page Template that displays the user 
> information based on the parameter.
> 
> All of what I've said so far could be wrong, so feel free to correct
> me if I've mis-spoken. The problem I have is that this asmithS guy
> seems magical. I can't figure out how the index_html knows to be
> called with the username as a parameter(obviously the index_html
> function doesn't explicitly require the parameter).
> 
> What I BELIEVE is happening: the asmithS argument is processed before 
> the page template renders. For example, when asmithS is given, a
> lookup is performed on the database that adds variables to the REQUEST
> object such as FirstName, LastName, etc. I can't find this happening
> but I think it must exist.

Check the code for your 'Users' object for one of the following methods:

- - '__bobo_traverse__'

- - '__getitem__'


I'm gueessing one of those is resposible for returning the object
corresponding to 'asmithS':  that object is the "here" (context) for the
template.

Another (weirder) possibility is the '__before_publishing_traverse__'
method, which (if present) gets called when publishing traversal enters
an object:  it can munge the request arbitrarily.


Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlANklkACgkQ+gerLs4ltQ6UhgCgps7jhPQDmXkCm8SYXC43sCE6
wzAAoNoZkjejtPs3pnPkXkrUexZ6czYN
=puKr
-END PGP SIGNATURE-

___
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] problem installing Openflow product of zope on LINUX

2010-12-07 Thread Philip Kilner
Hi Smita,

On 07/12/2010 15:26, Smita Kamdar wrote:
> I have already installed the following products on my dev RedHat LINUX m/c –
>
> 1) Zope-2.11.4
>
> 2) Python-2.4.4
>
> 3) Egenix-2.0.6
>
> 4) Postgresql-7.4.13
>
> 5) Psycopg-1.1.6
>
> 6) OpenFlow-1.1.0
>
> & on the live m/c also all these products are installed with a mismatch
> in versions of the products. Only in case of Database Adapter instead of
> ZPsycopgDA, ZPygresqlDA is installed on live.
>

Is there a reason that you are using ZPsycopgDA instead of ZPygresqlDA?

You should set the two environments up identically.

> But still when I import my project’s source code (i.e. .zexp file) from
> live to dev m/c all the code is imported successfully except it gives
> errors in Pygresql_Database_Connection & OpenFlow.
>
> For Pygresql_Database_Connection & Openflow it gives error as ‘This
> object from PygresqlDA product is broken’ & ‘This object from OpenFlow
> product is broken’ respectively.
>

If you are importing a zexp that contains a ZPygresqlDA connection and 
the ZPygresqlDA product is not properly installed, you will indeed have 
broken objects - that would apply to ZPsycopgDA too, of course. If you 
want to use the imported objects, you must have the same products 
installed (at the same versions).

I don't know anything about ZPygresqlDA (or OpenFlow, for that matter), 
but I've had similar problems with ZPsycopgDA, so the following may be 
of some help: -

First, is your DA correctly installed?

Take a look at the Control Panel in the ZMI, and scroll down to the DA 
itself - does it have a "broken product" icon? If so, this may be 
because the associated python-level product (which would be Psycopg 
itself in the case of ZPsycopgDA) is not correctly installed.

N.B. You may have to install libpq-dev to compile it.

Second, is the DA actually usable?

Even if it appears installed properly in the Control Panel, it's worth 
testing by setting up a new connection to your database.

If you have a good setup, and the error is still thrown, you would still 
need to zap the old product's connection and replace it with the new 
product's equivalent, of course

Formally, you are on your own importing a zexp file into a target 
environment that differs from the source environment. If the above does 
not help, then I'd go back and make the necessary changes to make them 
match before spending a lot of time on this.

HTH


-- 

Regards,

PhilK


'work as if you lived in the early days of a better nation'
- alasdair gray
___
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] problem installing Openflow product of zope on LINUX

2010-12-07 Thread Smita Kamdar
Hi Marco,

 

I have already installed the following products on my dev RedHat LINUX
m/c -

 

1) Zope-2.11.4

2) Python-2.4.4

3) Egenix-2.0.6

4) Postgresql-7.4.13

5) Psycopg-1.1.6

6) OpenFlow-1.1.0

 

& on the live m/c also all these products are installed with a mismatch
in versions of the products. Only in case of Database Adapter instead of
ZPsycopgDA, ZPygresqlDA is installed on live.

 

But still when I import my project's source code (i.e. .zexp file) from
live to dev m/c all the code is imported successfully except it gives
errors in Pygresql_Database_Connection & OpenFlow.

 

For Pygresql_Database_Connection & Openflow it gives error as 'This
object from PygresqlDA product is broken' & 'This object from OpenFlow
product is broken' respectively.

 

Is the issue because of mismatch of PygresqlDA & PsycopgDA at live & dev
respectively??

Thanks a Lot In Advance!

 

 

Thanks & Regards,

Smita Kamdar 

 

 

 


Disclaimer:
  This message and the information contained herein is proprietary and 
confidential and subject to the Tech Mahindra policy statement, you may review 
the policy at http://www.techmahindra.com/Disclaimer.html";>http://www.techmahindra.com/Disclaimer.html
 externally and http://tim.techmahindra.com/Disclaimer.html";>http://tim.techmahindra.com/Disclaimer.html
 internally within Tech 
Mahindra.
___
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] problem installing Openflow product of zope on LINUX

2010-11-28 Thread Riccardo Lemmi
Chris Withers wrote:

> On 28/11/2010 10:24, Riccardo Lemmi wrote:
>> If you need a workflow engine modern and up-to-date I counsel to integrate
>> openwfe (now 'route': http://ruote.rubyforge.org/)
> 
> ...which is Ruby, right?
> 
> How do you get that to work with Zope?
> 
> Chris
> 

Yes, it is ruby, but it is a client/server app.
Last time I checked there was connectors for various languages, python included.
I haven't the chance to integrate route in zope in a real project but I
assessed that the connector was very simple to use.
-- 
Riccardo Lemmi

___
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] problem installing Openflow product of zope on LINUX

2010-11-28 Thread Chris Withers
On 28/11/2010 10:24, Riccardo Lemmi wrote:
> If you need a workflow engine modern and up-to-date I counsel to integrate
> openwfe (now 'route': http://ruote.rubyforge.org/)

...which is Ruby, right?

How do you get that to work with Zope?

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
___
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] problem installing Openflow product of zope on LINUX

2010-11-28 Thread Riccardo Lemmi
smita kamdar wrote:

> Hi,
> 
> I am supposed to set up development environment for a project. & for that I
> have already installed Zope-2.11.4, Python-2.4.4, Egenix-2.0.6,
> Postgresql-7.4.13, & Psycopg-1.1.6 on a RedHat LINUX box.
> 
> 
> 
> Now I need to install OpenFlow-1.1.0 in the Products directory of Zope. I
> tried installing OpenFlow source tar ball by the following instructions ?
> 
> ./configure
> 
> Make
> 
> Sudo make install
> 
> 
> 
> All of the above commands worked successfully. But still I am not able to
> see the openflow product on the Zope Management Interface Screen. Can you
> please suggest something? It?s really urgent. Am I missing any steps while
> installing OpenFlow? Please Help me.
> 
> 
> 
> Regards,
> 
> Smita

First of all you need to make a correct installation of Zope: use 'make inplace'
followed by './bin/mkzopeinstance.py'. 
In the created zope instance switch to the Products folder and unpack the
OpenFlow tgz file. 

The problem is: the code is old and not working with the last zope versions. The
fix is simple: in the file expression.py change line
 from Products.PageTemplates.Expressions import getEngine, _SecureModuleImporter
in
 from Products.PageTemplates.Expressions import getEngine, SecureModuleImporter

and remove
 
  SecureModuleImporter = _SecureModuleImporter()

(at least in the version I have)

If you need a workflow engine modern and up-to-date I counsel to integrate
openwfe (now 'route': http://ruote.rubyforge.org/)
-- 
Riccardo Lemmi

___
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] problem installing Openflow product of zope on LINUX

2010-11-26 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

smita kamdar wrote:
> Hi,
> 
> I am supposed to set up development environment for a project. & for
> that I have already installed Zope-2.11.4, Python-2.4.4, Egenix-2.0.6,
> Postgresql-7.4.13, & Psycopg-1.1.6 on a RedHat LINUX box.
> 
>  
> 
> Now I need to install OpenFlow-1.1.0 in the Products directory of Zope.
> I tried installing OpenFlow source tar ball by the following instructions –
>#


As said: OpenFlow is *very old* and *unmaintained* since years.

Loook for alternatives.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJM8ArOAAoJEADcfz7u4AZjjUwLv2rAzcM+7KhTstMVXw/gUEQL
OKx5bGywpo3foIbTrQGC64yZynXZRVP6vmVBYHwKOVb1AQXXqbulaOadvoQU6XIn
wiJ/Kovgi69Sb0XUz8YnTso/fnk4uuLLIRpE6KGnJtXOjLf2du6krnIJsOyqTQ95
pQwsK8aLmxE9QP93hno71gxb2wbfdWyP3PbBRCTg+yzg0w9lkMn8z4Dav5pVOPla
naiScwJSZt2H+dymJyt99yHhPMfylGzGxlsTMR7gBj3QTd2HoTTG5ydXCODBsC8l
Z5mveHXKNh22RxSzeO9bdt8di75eEeGkeumJvSjwlkw7SQO5UMBXhyr8pnRvKUAm
NDe/QsDt8GUmAqfpda2AfzDxddnW0ek/wEbuns9Jlty8SZVqpNEw4NSvW8K7wYLz
islrgjG87NxPlGIvbPiW0Axr+aCuJrWEestM7bJwnAXkigPQvtPvyN2LeeNzdbvy
AWNnBzU6qFvzekoufYfrIoGMErLD1N4=
=4fUq
-END PGP SIGNATURE-
<>___
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] Problem with non-latin character sets in Page Templates

2010-05-17 Thread Vladislav Vorobiev
On 05/17/2010 10:03 PM, Christopher N. Deckard wrote:
> Hello,
> Due to ICANN's decision to allow for non-Latin characters in domain
> names, I thought I'd give our Zope installation a test to see how it
> would handle it.  We've had problems with people copy and pasting from
> MS Word, and its use of strange characters.  I'm sure at some point the
> faculty here at Purdue will have a need to link to web sites using
> non-Latin characters.
>
> This is my example HTML:
>
> 
>   
> URL Test
>   
>   
>  href="http://EHB9.H2'1)-'D#*5'D'*.E51">http://EHB9.H2'1)-'D#*5'D'*.E51.
>   
> 
>
>
> Not only is it a different character set, but it is a right to left
> character set.  This code works fine while editing a Page Template.
> However, when viewing it, all of those characters in the href are
> converted to question marks.  If the same HTML is pasted into a DTML
> Method or a File object, Zope will convert the characters to ASCII
> characters.  When viewed it will be viewed correctly.
>
> Any reason that Page Templates may fail to render this properly?
>
It is a bug of page template. I patched them

zope.pagetemplate-3.5.0-py2.6.egg/zope/pagetemplate/pagetemplate.py

line 116 return output.getvalue()

to

116 # --- unicode/utf-8 hotfix ---
   for idx in range(0, len(output.buflist)):
   try:
   output.buflist[idx] = unicode(output.buflist[idx], 'utf-8')
   except (UnicodeDecodeError):
   output.buflist[idx] = output.buflist[idx].decode('utf-8',
'replace')
   except:
   pass

   return output.getvalue()
   # --- unicode/utf-8 hotfix ---


___
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 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] problem with commits in SQLAlchemyDA

2010-04-27 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brad Allen wrote:

> 
> * The tests were written for SQLALchemy 0.4, which had a
> "session.save" method. SQLAlchemy 0.5 and 0.6 use "session.add". Do we
> need to maintain support for SQLAlchemy 0.4? I am tempted to make this
> new release support only 0.5 and 0.6, and see if anyone squawks.
> Hopefully most everyone has migrated to at least 0.5. (We can support
> both with conditional sqlalchemy.__version__ checks, but that can get
> ugly).

Nobody cares about SA 0.4. The most current version is 0.6 and 0.5 is in
maintenance mode. Keeping the dependency stack in mind:

SQlAlchemy <- zope.sqlalchemy <- z3c.sqlalchemy <- SQLAlchemyDA

The complete stack must fit together.

Andreas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvXIj0ACgkQCJIWIbr9KYzFNgCdEob7aNohnR9uJkNfnUDYmOb5
yK8AoJmtBurrsvuulpNZelvdoGbTVVq9
=u/tn
-END PGP SIGNATURE-
<>___
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] problem with commits in SQLAlchemyDA

2010-04-27 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brad Allen wrote:
> Tres Seaver said:
>> Thanks for taking this initiative, Brad!
> 
> Thanks for the encouragement.
> 
> Kader got started on this and he came up with a couple of questions:
> 
> * The tests for SQLALchemy DA make use of ZopeTestCase. Is that
> deprecated? I found a discussion of Zope test runners in zope-dev,
> thread titled "circular dependency hell", which left me confused about
> where Zope testing is going.

Functional testing for Zope2 products likely still uses the
Testing.ZopeTestCase fixtures.  That discussion was largely about how to
move forward the lower-level unit and integration tests for the ZTK
packages (not specific to Zope2 at all), particularly to ease porthing
the ZTK to Python 3.

> * The tests were written for SQLALchemy 0.4, which had a
> "session.save" method. SQLAlchemy 0.5 and 0.6 use "session.add". Do we
> need to maintain support for SQLAlchemy 0.4? I am tempted to make this
> new release support only 0.5 and 0.6, and see if anyone squawks.
> Hopefully most everyone has migrated to at least 0.5. (We can support
> both with conditional sqlalchemy.__version__ checks, but that can get
> ugly).

I'm not a user, so I won't express a preference.  If you do drop support
for the earlier version of SA, then you need to probably bump the major
versino number of the product, as well as highlighting that change
prominently in the CHANGES.txt.



Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkvXIQgACgkQ+gerLs4ltQ4kHwCgpc/F00KfGnxJU0AoA3kwIOCj
C3MAn1vMxKtgdY1Ja89nvCiQ26XRFTJT
=eO80
-END PGP SIGNATURE-

___
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] problem with commits in SQLAlchemyDA

2010-04-27 Thread Brad Allen
Tres Seaver said:
> Thanks for taking this initiative, Brad!

Thanks for the encouragement.

Kader got started on this and he came up with a couple of questions:

* The tests for SQLALchemy DA make use of ZopeTestCase. Is that
deprecated? I found a discussion of Zope test runners in zope-dev,
thread titled "circular dependency hell", which left me confused about
where Zope testing is going.

* The tests were written for SQLALchemy 0.4, which had a
"session.save" method. SQLAlchemy 0.5 and 0.6 use "session.add". Do we
need to maintain support for SQLAlchemy 0.4? I am tempted to make this
new release support only 0.5 and 0.6, and see if anyone squawks.
Hopefully most everyone has migrated to at least 0.5. (We can support
both with conditional sqlalchemy.__version__ checks, but that can get
ugly).

Thanks!
___
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] problem with commits in SQLAlchemyDA

2010-04-26 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brad Allen wrote:
> I've created a LaunchPad project for the Zope SQLAlchemy DA, and
> created a LaunchPad team of people who are interested in maintaining
> it. Andreas has been listed as the main driver, and links have been
> setup to Andrea's home page, SVN, and PyPI.
> 
> https://launchpad.net/zope-sqlalchemy-da
> 
> A bug for this issue has been created here:
> 
> https://bugs.launchpad.net/zope-sqlalchemy-da/+bug/570208
> 
> There is a new branch commited to svn.zope which can be used to work
> on this fix:
> 
> http://svn.zope.org/Products.SQLAlchemyDA/branches/zsql_commit_fix/
> 
> One of my co-workers, Kader has been assigned to work on this.

Thanks for taking this initiative, Brad!


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkvV2DQACgkQ+gerLs4ltQ62SgCeJz8jd8yMe4Hl9KO8uPDwIxCx
szcAoI+jysgXKdeYXhg15hdPUhE5M9oJ
=37N2
-END PGP SIGNATURE-

___
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] problem with commits in SQLAlchemyDA

2010-04-26 Thread Brad Allen
I've created a LaunchPad project for the Zope SQLAlchemy DA, and
created a LaunchPad team of people who are interested in maintaining
it. Andreas has been listed as the main driver, and links have been
setup to Andrea's home page, SVN, and PyPI.

https://launchpad.net/zope-sqlalchemy-da

A bug for this issue has been created here:

https://bugs.launchpad.net/zope-sqlalchemy-da/+bug/570208

There is a new branch commited to svn.zope which can be used to work
on this fix:

http://svn.zope.org/Products.SQLAlchemyDA/branches/zsql_commit_fix/

One of my co-workers, Kader has been assigned to work on this.
___
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] problem with commits in SQLAlchemyDA

2010-04-25 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tres Seaver wrote:
> Andreas Jung wrote:
>> Tres Seaver wrote:
>>> Andreas Jung wrote:
 Brad Allen wrote:
> On Fri, Apr 23, 2010 at 9:44 AM, Brad Allen  
> wrote:
>> On Thu, Apr 22, 2010 at 11:37 PM, Andreas Jung  wrote:
 Can this fix be included in the upstream SQLAlchemy DA, so nobody has
 to monkeypatch it in?

>>> Sorry - being to busy right now. Please commit the fix yourself and
>>> someone with Zope checkin permissions in the repos and create a new
>>> release on PyPI (just tell me the related PyPI user id).
>> Thank, I'll get started on that. Since I am not sure if that change
>> will cause problems for anyone else using the SQLAlchemy DA, I guess
>> I'll start it out as a development release and solicit feedback.
> To clarify, by development release, I am talking about providing a
> release which can be installed like this:
 You create a branch on svn.zope.org
> easy_install SQLAlchemy==dev
 Please can use mr.developer under buildout for svn checkouts.
 I don't want to see dev packages (in general) on PyPI.
> That would install from a development branch. The normal easy_install
> would still pull from the most recent release, to avoid disruption and
> give people time to test. After some time, it could be made to a beta
> release.
 Sorry but why do you care about easy_install? Serious people use
 buildout. easy_install is for playing around.
>>> That's an opinon, and one which you haven't done the work yourself to
>>> back up -- there is no buildout support here:
>>>   http://svn.zope.org/Products.SQLAlchemyDA/trunk/
>> mr.developer is your friend.
> 
> The point is that you aren't using buildout to manage / test that
> package "inline":  you don't have any grounds for objecting that
> somebody else doesn't use it either.

I just said that I don't care about easy_install related issues.
Especially because you are interested to use SQLAlchemyDA in a
real-world installation as a replacement for some existing DA against a
real-world database. I have never objected contributions to my software
by other people. So everybody is free to fix and improve SQLAlchemyDA
and other stuff on svn.zope.org - it's open source :-)

Andreas

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvT6aAACgkQCJIWIbr9KYx+MQCg17r6htpZrtSfvkoS1RZbf2w9
SEQAoNJHcaBieiU8K3n0a/l1H82ZfjnC
=FwX6
-END PGP SIGNATURE-
<>___
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] problem with commits in SQLAlchemyDA

2010-04-24 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andreas Jung wrote:
> Tres Seaver wrote:
>> Andreas Jung wrote:
>>> Brad Allen wrote:
 On Fri, Apr 23, 2010 at 9:44 AM, Brad Allen  wrote:
> On Thu, Apr 22, 2010 at 11:37 PM, Andreas Jung  wrote:
>>> Can this fix be included in the upstream SQLAlchemy DA, so nobody has
>>> to monkeypatch it in?
>>>
>> Sorry - being to busy right now. Please commit the fix yourself and
>> someone with Zope checkin permissions in the repos and create a new
>> release on PyPI (just tell me the related PyPI user id).
> Thank, I'll get started on that. Since I am not sure if that change
> will cause problems for anyone else using the SQLAlchemy DA, I guess
> I'll start it out as a development release and solicit feedback.
 To clarify, by development release, I am talking about providing a
 release which can be installed like this:
>>> You create a branch on svn.zope.org
 easy_install SQLAlchemy==dev
>>> Please can use mr.developer under buildout for svn checkouts.
>>> I don't want to see dev packages (in general) on PyPI.
 That would install from a development branch. The normal easy_install
 would still pull from the most recent release, to avoid disruption and
 give people time to test. After some time, it could be made to a beta
 release.
>>> Sorry but why do you care about easy_install? Serious people use
>>> buildout. easy_install is for playing around.
>> That's an opinon, and one which you haven't done the work yourself to
>> back up -- there is no buildout support here:
> 
>>   http://svn.zope.org/Products.SQLAlchemyDA/trunk/
> 
> mr.developer is your friend.

The point is that you aren't using buildout to manage / test that
package "inline":  you don't have any grounds for objecting that
somebody else doesn't use it either.

Zope2 products can have buildouts (see GenericSetup, PAS, etc.).



Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkvTK7oACgkQ+gerLs4ltQ5w3wCaAnv7Zdgg2vQ5IRC78QHVojAP
UYAAoIzZvb6r8dKsHqBPvGkxp+MEXhJE
=MvGK
-END PGP SIGNATURE-

___
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] problem with commits in SQLAlchemyDA

2010-04-23 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tres Seaver wrote:
> Andreas Jung wrote:
>> Brad Allen wrote:
>>> On Fri, Apr 23, 2010 at 9:44 AM, Brad Allen  wrote:
 On Thu, Apr 22, 2010 at 11:37 PM, Andreas Jung  wrote:
>> Can this fix be included in the upstream SQLAlchemy DA, so nobody has
>> to monkeypatch it in?
>>
> Sorry - being to busy right now. Please commit the fix yourself and
> someone with Zope checkin permissions in the repos and create a new
> release on PyPI (just tell me the related PyPI user id).
 Thank, I'll get started on that. Since I am not sure if that change
 will cause problems for anyone else using the SQLAlchemy DA, I guess
 I'll start it out as a development release and solicit feedback.
>>> To clarify, by development release, I am talking about providing a
>>> release which can be installed like this:
>> You create a branch on svn.zope.org
>>> easy_install SQLAlchemy==dev
>> Please can use mr.developer under buildout for svn checkouts.
>> I don't want to see dev packages (in general) on PyPI.
> 
>>> That would install from a development branch. The normal easy_install
>>> would still pull from the most recent release, to avoid disruption and
>>> give people time to test. After some time, it could be made to a beta
>>> release.
>> Sorry but why do you care about easy_install? Serious people use
>> buildout. easy_install is for playing around.
> 
> That's an opinon, and one which you haven't done the work yourself to
> back up -- there is no buildout support here:
> 
>   http://svn.zope.org/Products.SQLAlchemyDA/trunk/

mr.developer is your friend.

Andreas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvShfIACgkQCJIWIbr9KYxLewCffm64FP2k+P0VC4ZFznzzI5rw
wEwAn1VeG7+0F1PUC06r2K6FWEWjoNES
=NMhB
-END PGP SIGNATURE-
<>___
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] problem with commits in SQLAlchemyDA

2010-04-23 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andreas Jung wrote:
> Brad Allen wrote:
>> On Fri, Apr 23, 2010 at 9:44 AM, Brad Allen  wrote:
>>> On Thu, Apr 22, 2010 at 11:37 PM, Andreas Jung  wrote:
> Can this fix be included in the upstream SQLAlchemy DA, so nobody has
> to monkeypatch it in?
>
 Sorry - being to busy right now. Please commit the fix yourself and
 someone with Zope checkin permissions in the repos and create a new
 release on PyPI (just tell me the related PyPI user id).
>>> Thank, I'll get started on that. Since I am not sure if that change
>>> will cause problems for anyone else using the SQLAlchemy DA, I guess
>>> I'll start it out as a development release and solicit feedback.
>> To clarify, by development release, I am talking about providing a
>> release which can be installed like this:
> 
> You create a branch on svn.zope.org
>> easy_install SQLAlchemy==dev
> 
> Please can use mr.developer under buildout for svn checkouts.
> I don't want to see dev packages (in general) on PyPI.
> 
>> That would install from a development branch. The normal easy_install
>> would still pull from the most recent release, to avoid disruption and
>> give people time to test. After some time, it could be made to a beta
>> release.
> 
> Sorry but why do you care about easy_install? Serious people use
> buildout. easy_install is for playing around.

That's an opinon, and one which you haven't done the work yourself to
back up -- there is no buildout support here:

  http://svn.zope.org/Products.SQLAlchemyDA/trunk/

>> I've had trouble finding an issue tracker for the SQLAlchemy DA. Would
>> it make sense for me to create one on LaunchPad?
> 
> There is no tracker. You don't need a tracker for such a single issue.

Are you claiming like Dijkstra that fixing this bug will "remove the
last bug in [SQLAlchemyDA]"?

+1 to adding a Launchpad project for it.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkvRygsACgkQ+gerLs4ltQ5OkgCcDUIB90DqnUOqB/8VbTA2grmM
x0YAoLl2KId5tTCk055OkKr2GX1t8FIX
=2TWS
-END PGP SIGNATURE-

___
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] problem with commits in SQLAlchemyDA

2010-04-23 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brad Allen wrote:
> On Thu, Apr 22, 2010 at 11:37 PM, Andreas Jung  wrote:
>>> Can this fix be included in the upstream SQLAlchemy DA, so nobody has
>>> to monkeypatch it in?
>>>
>> Sorry - being to busy right now. Please commit the fix yourself and
>> someone with Zope checkin permissions in the repos and create a new
>> release on PyPI (just tell me the related PyPI user id).
> 
> Thank, I'll get started on that. Since I am not sure if that change
> will cause problems for anyone else using the SQLAlchemy DA, I guess
> I'll start it out as a development release and solicit feedback.
> 
> (Regarding my earlier question about svn checkout, I had forgotten
> that svn+ssh was required for zope.org checkouts. It's working fine
> now.)

(For the benefit of those playing along at home, maybe without commit
access)

I just finished documenting getting read-only checkouts over HTTP:

http://docs.zope.org/developer/noncommitter-svn.html#how-to-get-a-read-only-checkout-from-a-subversion-mirror

The tricky bit is having to add the '/repos/main' prefix to the path, in
order not to land on the "browser-centric" stuff at rooted at '/'.

The section above that one documents using 'svn://' URLs.

http://docs.zope.org/developer/noncommitter-svn.html#how-to-get-a-read-only-subversion-checkout


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkvRyIsACgkQ+gerLs4ltQ5LGACfX5KN8kq/6wFh5luyW485qMBl
ImAAniM9fYQ5GnLkgpyDtFy2w0grsmSC
=9tnu
-END PGP SIGNATURE-

___
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] problem with commits in SQLAlchemyDA

2010-04-23 Thread Brad Allen
On Fri, Apr 23, 2010 at 11:14 AM, Brad Allen  wrote:
> To install the 'dev' version using buildout, it might look something like 
> this:
>
> recipe = zc.recipe.egg
> eggs = Products.SQLAlchemyDA==dev

Or, you could put it in a version.cfg file which some buildouts use,
[versions]
Products.SQLAlchemyDA=dev
___
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] problem with commits in SQLAlchemyDA

2010-04-23 Thread Brad Allen
On Fri, Apr 23, 2010 at 10:32 AM, Andreas Jung  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Brad Allen wrote:
>> On Fri, Apr 23, 2010 at 9:44 AM, Brad Allen  wrote:
>>> On Thu, Apr 22, 2010 at 11:37 PM, Andreas Jung  wrote:
> Can this fix be included in the upstream SQLAlchemy DA, so nobody has
> to monkeypatch it in?
>
 Sorry - being to busy right now. Please commit the fix yourself and
 someone with Zope checkin permissions in the repos and create a new
 release on PyPI (just tell me the related PyPI user id).
>>> Thank, I'll get started on that. Since I am not sure if that change
>>> will cause problems for anyone else using the SQLAlchemy DA, I guess
>>> I'll start it out as a development release and solicit feedback.
>>
>> To clarify, by development release, I am talking about providing a
>> release which can be installed like this:
>
> You create a branch on svn.zope.org
>>
>> easy_install SQLAlchemy==dev
>
> Please can use mr.developer under buildout for svn checkouts.
> I don't want to see dev packages (in general) on PyPI.
>
>>
>> That would install from a development branch. The normal easy_install
>> would still pull from the most recent release, to avoid disruption and
>> give people time to test. After some time, it could be made to a beta
>> release.
>
> Sorry but why do you care about easy_install? Serious people use
> buildout. easy_install is for playing around.

Sure, we use buildout where I work. But it relies on setuptools, as
does easy_install. So I was making an example of specifying an egg
using easy_install, but you can also use the same version selection
syntax from a buildout.cfg.

To install the 'dev' version using buildout, it might look something like this:

recipe = zc.recipe.egg
eggs = Products.SQLAlchemyDA==dev

This would allow other users to try out the dev version easily in
their existing buildouts, without having to use svn recipes or
mr.developer. It's important to make it low effort for people in order
get more participation in testing.


>> I've had trouble finding an issue tracker for the SQLAlchemy DA. Would
>> it make sense for me to create one on LaunchPad?
>
> There is no tracker. You don't need a tracker for such a single issue.

You sound pretty confident that there won't be more issues. I'm glad,
because we want to use SQLAlchemy DA in future production, and have
parts of our app use zsql, while other parts call into the SQLAlchemy
API, possibly from within the same transaction.

I could see the possibility of more issues as we test with different
database platforms like Oracle and MSSQL. Also, I am wondering if any
changes in the DA will be required to support Zope 2.12+.

Even if there is only one ticket to start with, it seems like a good
idea to have an issue tracker.  Would it make sense to use the Zope 2
issue tracker, since this is a component for Zope 2?

https://bugs.launchpad.net/zope2
___
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] problem with commits in SQLAlchemyDA

2010-04-23 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brad Allen wrote:
> On Fri, Apr 23, 2010 at 9:44 AM, Brad Allen  wrote:
>> On Thu, Apr 22, 2010 at 11:37 PM, Andreas Jung  wrote:
 Can this fix be included in the upstream SQLAlchemy DA, so nobody has
 to monkeypatch it in?

>>> Sorry - being to busy right now. Please commit the fix yourself and
>>> someone with Zope checkin permissions in the repos and create a new
>>> release on PyPI (just tell me the related PyPI user id).
>> Thank, I'll get started on that. Since I am not sure if that change
>> will cause problems for anyone else using the SQLAlchemy DA, I guess
>> I'll start it out as a development release and solicit feedback.
> 
> To clarify, by development release, I am talking about providing a
> release which can be installed like this:

You create a branch on svn.zope.org
> 
> easy_install SQLAlchemy==dev

Please can use mr.developer under buildout for svn checkouts.
I don't want to see dev packages (in general) on PyPI.

> 
> That would install from a development branch. The normal easy_install
> would still pull from the most recent release, to avoid disruption and
> give people time to test. After some time, it could be made to a beta
> release.

Sorry but why do you care about easy_install? Serious people use
buildout. easy_install is for playing around.

> 
> I've had trouble finding an issue tracker for the SQLAlchemy DA. Would
> it make sense for me to create one on LaunchPad?

There is no tracker. You don't need a tracker for such a single issue.

Andreas


- -- 
ZOPYX Limited   | zopyx group
Charlottenstr. 37/1 | The full-service network for Zope & Plone
D-72070 Tübingen| Produce & Publish
www.zopyx.com   | www.produce-and-publish.com
- 
E-Publishing, Python, Zope & Plone development, Consulting


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvRvXMACgkQCJIWIbr9KYzscACffqW1UH4EClktH2cJG+wkkkGD
Hl8AoKrf24zd3aq+4vNaJdVAjF//RnKu
=Jcgl
-END PGP SIGNATURE-
<>___
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] problem with commits in SQLAlchemyDA

2010-04-23 Thread Brad Allen
On Fri, Apr 23, 2010 at 9:44 AM, Brad Allen  wrote:
> On Thu, Apr 22, 2010 at 11:37 PM, Andreas Jung  wrote:
>>> Can this fix be included in the upstream SQLAlchemy DA, so nobody has
>>> to monkeypatch it in?
>>>
>>
>> Sorry - being to busy right now. Please commit the fix yourself and
>> someone with Zope checkin permissions in the repos and create a new
>> release on PyPI (just tell me the related PyPI user id).
>
> Thank, I'll get started on that. Since I am not sure if that change
> will cause problems for anyone else using the SQLAlchemy DA, I guess
> I'll start it out as a development release and solicit feedback.

To clarify, by development release, I am talking about providing a
release which can be installed like this:

easy_install SQLAlchemy==dev

That would install from a development branch. The normal easy_install
would still pull from the most recent release, to avoid disruption and
give people time to test. After some time, it could be made to a beta
release.

I've had trouble finding an issue tracker for the SQLAlchemy DA. Would
it make sense for me to create one on LaunchPad?
___
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] problem with commits in SQLAlchemyDA

2010-04-23 Thread Brad Allen
On Thu, Apr 22, 2010 at 11:37 PM, Andreas Jung  wrote:
>> Can this fix be included in the upstream SQLAlchemy DA, so nobody has
>> to monkeypatch it in?
>>
>
> Sorry - being to busy right now. Please commit the fix yourself and
> someone with Zope checkin permissions in the repos and create a new
> release on PyPI (just tell me the related PyPI user id).

Thank, I'll get started on that. Since I am not sure if that change
will cause problems for anyone else using the SQLAlchemy DA, I guess
I'll start it out as a development release and solicit feedback.

(Regarding my earlier question about svn checkout, I had forgotten
that svn+ssh was required for zope.org checkouts. It's working fine
now.)
___
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] problem with commits in SQLAlchemyDA

2010-04-22 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brad Allen wrote:
> Maybe I wasn't clear but the patch works well with my existing zsql code.
> 
> Andreas,
> 
> We are trying out the Zope SQLAlchemy DA at work, and one of our
> developers saw the same problem with no commits being generated after
> executing zsqls (running against cx_Oracle).
> 
> Can this fix be included in the upstream SQLAlchemy DA, so nobody has
> to monkeypatch it in?
> 

Sorry - being to busy right now. Please commit the fix yourself and
someone with Zope checkin permissions in the repos and create a new
release on PyPI (just tell me the related PyPI user id).

Andreas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvRI/EACgkQCJIWIbr9KYzKaACfQ9OarTtqWa8Hc9N4uyXjCNqf
VpkAmwRugE8PhxRkQKM+Px8326rrzPiR
=dsfa
-END PGP SIGNATURE-
<>___
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] problem with commits in SQLAlchemyDA

2010-04-22 Thread Brad Allen
On Mon, Aug 17, 2009 at 9:24 AM, Maric Michaud  wrote:
> robert rottermann a écrit :
>  > I do not see any reference to mark_changed
>  > you have to call it before any transaction.commit() to tell the zope
> transaction
>  > machinery that it has to commit you changes also.
>  > robert
>  >
>
> In fact, what I understood is that zope.sqlalchemy, by default, bypasses
> the commit if status is not manually set as 'changed' (see the docstring
> I quoted in my previous mail). The alternative is to build the
> SessionExtension with initial_state == STATUS_INVALIDATED.
>
> My point is that it should be the default for a DA, as it is intended to
> be used mainly by zsql methods which doesn't do nothing to the
> transaction state.
>
> Maybe I wasn't clear but the patch works well with my existing zsql code.

Andreas,

We are trying out the Zope SQLAlchemy DA at work, and one of our
developers saw the same problem with no commits being generated after
executing zsqls (running against cx_Oracle).

Can this fix be included in the upstream SQLAlchemy DA, so nobody has
to monkeypatch it in?

By the way, I attempted to checkout this code, to start a topic branch
for this, but got a message which didn't make sense to me:

svn co http://svn.zope.org/Products.SQLAlchemyDA/

svn: Repository moved permanently to '/Products.SQLAlchemyDA/'; please relocate
___
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] Problem Building 2.10.x

2010-03-24 Thread Susan Day
On Wed, Mar 24, 2010 at 10:13 AM, Tres Seaver  wrote:

> You need to show us the lines above that.  You almost certainly need to
> have the python-dev (or python-devel) RPM installed too:  it has the
> header files for Python.
>

Bingo. That did it and got me in. Been years since I screwed around in Zope
;/
Thanks,
Susan
___
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] Problem Building 2.10.x

2010-03-24 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Susan Day wrote:
> On Wed, Mar 24, 2010 at 9:12 AM, Tres Seaver  wrote:
> 
>> You should be able to override the "allowed" versions of Python:
>>
>>  $ cd /path/to/Zope-2.10.11
>>  $ ./configure --with-python=/usr/bin/python && make inplace
>>
> 
> I tried just that and got the following error:
> 
> error: command 'gcc' failed with exit status 1
> make: *** [build] Error 1
> 
> So I did this:
> 
> [r...@zope-2.10.9-final]# yum install gcc
> 
> and got this at the end:
> 
> Updated:
>   gcc.x86_64
> 0:4.1.2-46.el5_4.2
> 
> 
> Dependency Updated:
>   cpp.x86_64 0:4.1.2-46.el5_4.2  gcc-c++.x86_64
> 0:4.1.2-46.el5_4.2libgcc.i386 0:4.1.2-46.el5_4.2
> libgcc.x86_64 0:4.1.2-46.el5_4.2
>   libstdc++.i386 0:4.1.2-46.el5_4.2  libstdc++.x86_64
> 0:4.1.2-46.el5_4.2  libstdc++-devel.x86_64 0:4.1.2-46.el5_4.2
> 
> Complete!
> 
> So I tried Zope again and again got this:
> 
> error: command 'gcc' failed with exit status 1
> make: *** [build] Error 1

You need to show us the lines above that.  You almost certainly need to
have the python-dev (or python-devel) RPM installed too:  it has the
header files for Python.

> [r...@zope-2.10.9-final]# gcc -V
> gcc: '-V' option must have argument
> # Whatever. At least it recognized gcc

Try:

  $ gcc --version

> So what up? I also tried installing Python 2.4.6 on my Mac and got a gcc
> error!? What do?

The system Python supplied by Apple is built *very* strangely, and is
likely not to be satisfactory.  My Mac-wielding partners recommend
installing the Xcode (?) tools first, then building Python from source
before building Zope.  Some folks use the compiler / Python from fink or
MacPorts, as well.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkuqHh0ACgkQ+gerLs4ltQ6WLACfWE0hPKm/3ywTryQ1KwMDOaa9
UeoAn2PENpG7DQP+R/zkPbYvp0lpdrvi
=KSoJ
-END PGP SIGNATURE-
___
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] Problem Building 2.10.x

2010-03-24 Thread Susan Day
On Wed, Mar 24, 2010 at 9:12 AM, Tres Seaver  wrote:

> You should be able to override the "allowed" versions of Python:
>
>  $ cd /path/to/Zope-2.10.11
>  $ ./configure --with-python=/usr/bin/python && make inplace
>

I tried just that and got the following error:

error: command 'gcc' failed with exit status 1
make: *** [build] Error 1

So I did this:

[r...@zope-2.10.9-final]# yum install gcc

and got this at the end:

Updated:
  gcc.x86_64
0:4.1.2-46.el5_4.2


Dependency Updated:
  cpp.x86_64 0:4.1.2-46.el5_4.2  gcc-c++.x86_64
0:4.1.2-46.el5_4.2libgcc.i386 0:4.1.2-46.el5_4.2
libgcc.x86_64 0:4.1.2-46.el5_4.2
  libstdc++.i386 0:4.1.2-46.el5_4.2  libstdc++.x86_64
0:4.1.2-46.el5_4.2  libstdc++-devel.x86_64 0:4.1.2-46.el5_4.2

Complete!

So I tried Zope again and again got this:

error: command 'gcc' failed with exit status 1
make: *** [build] Error 1
[r...@zope-2.10.9-final]# gcc -V
gcc: '-V' option must have argument
# Whatever. At least it recognized gcc

So what up? I also tried installing Python 2.4.6 on my Mac and got a gcc
error!? What do?
TIA,
Susan
___
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] Problem Building 2.10.x

2010-03-24 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Susan Day wrote:
> Hi;
> I'm trying to build 2.10.x on a CentOS 5.4 server. I get the error that I
> need to upgrade my Python from 2.4.3 to (I believe) 2.4.6. The problem is
> that I really can't do that using rpms unless I roll my own. Before doing
> that I wanted to consult you all and ask your advice.

You should be able to override the "allowed" versions of Python:

 $ cd /path/to/Zope-2.10.11
 $ ./configure --with-python=/usr/bin/python && make inplace

It is unlikely that whatever bugfix was in Python 2.4.4 will keep Zope
from working, although running with that version in production might be
less stable somehow.

> PS Another option would be to build this on my Mac, but it doesn't look like
> Zope supports that platform.

Zope will build pretty much anywhere the corresponding Python will
build.  Lots of developers use Zope on their OS/X laptops, for instance.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkuqD7sACgkQ+gerLs4ltQ4JuQCcDU/hTJourpjZ7+2ZwvCX92j1
b/sAn10zSdLOkHG7mpOo1fZNIQF2GYc5
=X/Th
-END PGP SIGNATURE-

___
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] Problem Building 2.10.x

2010-03-24 Thread Andrew Milton
+---[ Susan Day ]--
| Hi;
| I'm trying to build 2.10.x on a CentOS 5.4 server. I get the error that I 
need to upgrade my Python from 2.4.3 to (I believe)
| 2.4.6. The problem is that I really can't do that using rpms unless I roll my 
own. Before doing that I wanted to consult you all
| and ask your advice.

2.4.3 should be fine as a substitute for 2.4.6 sans some bug fixes in python.

| PS Another option would be to build this on my Mac, but it doesn't
| look like Zope supports that platform.

Zope should work anywhere python works. And python definitely works
under OSX (given it's just unix under the hood).

-- 
Andrew Milton
a...@theinternet.com.au
___
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] Problem with Zodb connections pool

2009-10-14 Thread Peter Bengtsson
2009/10/14 Tres Seaver :
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Claudio Battaglino wrote:
>> Hi all,
>> I've a system with Zope 2.8.8 that since some weeks is very slow.
>> The python process keeps busy the CPU (98-99%) and the memory used by
>> the process is growing up.
>> Every day a script makes a pack of the ZODB and restarts Zope so the
>> Data.fs size is stable (about 350MB).
>>
>> In the event.log I can see many of this warnings:
>> 2009-10-14T11:59:14 WARNING ZODB.DB DB.open() has 8 open connections
>> with a pool_size of 7
>>
>> What does it mean?
>
> Likely something in your application is leaking connections (and
> therefore RAM).  Normally each "worker" thread gets a connection from
> the pool at the start of the request, uses it, and then returns it to
> the pool at the end of the request.
>
> If you are using the default configuration for number of threads (4),
> then something has leaked four connections (assuming your server is busy
> at the time you see that log message).  You should examine the "Debug
> Information" page in the ZMI control panel to get information for
> diagnosing the leak.
>

Tres is right. Use the Debug Information. Especially look for requests
(the last big table) that take longer than 1 second.
The table will provide some information about what request is taking so long.
Additionally/Alternatively you can check out DeadlockDebugger which
you have to install manually for your Zope and you get the same
information but instead of information about the requests you get
tracebacks from within the code that is executing the requests.


>> I can see also some of these messages:
>> 2009-10-14T12:14:16 INFO ZODB.Conflict database conflict error...
>>
>> According to you, are the two messages related?
>
> No.  Conflict errors occur normally, whenever "simultaneous" requests
> cause writes to the same objects.  The request whose transaction commits
> "later" gets retried, up to three times;  if it still conflicts, then
> the request returns an error, and you see the message in your logfile.
>
>
> Tres.
> - --
> ===
> Tres Seaver          +1 540-429-0999          tsea...@palladion.com
> Palladion Software   "Excellence by Design"    http://palladion.com
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkrVrT4ACgkQ+gerLs4ltQ5HagCeJ1X32zT+LOMasY90fzmBolzR
> Q6MAn3qHhkjENxxr7B24z54fsj4TCfQT
> =ETsW
> -END PGP SIGNATURE-
>
> ___
> Zope maillist  -  z...@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 )
>



-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
fun crosstips.org
___
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] Problem with Zodb connections pool

2009-10-14 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Claudio Battaglino wrote:
> Hi all,
> I've a system with Zope 2.8.8 that since some weeks is very slow.
> The python process keeps busy the CPU (98-99%) and the memory used by
> the process is growing up.
> Every day a script makes a pack of the ZODB and restarts Zope so the
> Data.fs size is stable (about 350MB).
> 
> In the event.log I can see many of this warnings:
> 2009-10-14T11:59:14 WARNING ZODB.DB DB.open() has 8 open connections
> with a pool_size of 7
> 
> What does it mean?

Likely something in your application is leaking connections (and
therefore RAM).  Normally each "worker" thread gets a connection from
the pool at the start of the request, uses it, and then returns it to
the pool at the end of the request.

If you are using the default configuration for number of threads (4),
then something has leaked four connections (assuming your server is busy
at the time you see that log message).  You should examine the "Debug
Information" page in the ZMI control panel to get information for
diagnosing the leak.

> I can see also some of these messages:
> 2009-10-14T12:14:16 INFO ZODB.Conflict database conflict error...
> 
> According to you, are the two messages related?

No.  Conflict errors occur normally, whenever "simultaneous" requests
cause writes to the same objects.  The request whose transaction commits
"later" gets retried, up to three times;  if it still conflicts, then
the request returns an error, and you see the message in your logfile.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrVrT4ACgkQ+gerLs4ltQ5HagCeJ1X32zT+LOMasY90fzmBolzR
Q6MAn3qHhkjENxxr7B24z54fsj4TCfQT
=ETsW
-END PGP SIGNATURE-

___
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] problem connecting LdapUserFolder with Active Directory

2009-09-02 Thread Miguel Beltran R.
2009/9/2 Jens Vagelpohl 

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> On Sep 2, 2009, at 04:33 , Miguel Beltran R. wrote:
>
> > OPERATIONS_ERROR: {'info': ': LdapErr: DSID-0C090627,
> > comment: In
> > order to perform this operation a successful bind must be completed
> > on the
> > connection., data 0, vece', 'desc': 'Operations error'}
>
> The error message is informative enough I would say. An operation
> (probably a search) is being performed, but no bind has happened.
>
> Since there is a (simple) bind being performed in the code right
> before this error it appears AD does not like it. Maybe AD is not
> configured to allow sinple user/password binds. Or it is configured to
> only allow access from certain hosts, and the host with the Zope
> installation is not on that list. With AD, the possibilities for
> problems are endless.
>
> jens
>
>
> Thanks Jens, after a second look on directory LdapUserFolder (v2.12) I
found README.ActiveDirectory.txt what say how configure correctly LUF
My options was:
All options in LdapUserFolder use default, except
*Users Base DN  =  ou=Usuarios,ou=CEED,dc=ceed,dc=local
*Groups Base DN  =  ou=Usuarios,ou=CEED,dc=ceed,dc=local
*Manager DN = cn=zopeldap,ou=Usuarios,ou=CEED,dc=ceed,dc=local
* Manager DN Usage = Always (before was for login data only)  **important
option**
*read-only= on

The server now connect to port 3268
___
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] problem connecting LdapUserFolder with Active Directory

2009-09-01 Thread Jens Vagelpohl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On Sep 2, 2009, at 04:33 , Miguel Beltran R. wrote:

> OPERATIONS_ERROR: {'info': ': LdapErr: DSID-0C090627,  
> comment: In
> order to perform this operation a successful bind must be completed  
> on the
> connection., data 0, vece', 'desc': 'Operations error'}

The error message is informative enough I would say. An operation  
(probably a search) is being performed, but no bind has happened.

Since there is a (simple) bind being performed in the code right  
before this error it appears AD does not like it. Maybe AD is not  
configured to allow sinple user/password binds. Or it is configured to  
only allow access from certain hosts, and the host with the Zope  
installation is not on that list. With AD, the possibilities for  
problems are endless.

jens



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

iEYEARECAAYFAkqeEQwACgkQRAx5nvEhZLK6nACfSTxtVaplzFSh9NZbhlp61Obr
BmcAnRr626z6IIfzu062WzWcnh0CRvcO
=CmKK
-END PGP SIGNATURE-
___
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] problem with commits in SQLAlchemyDA

2009-08-30 Thread Andreas Jung
On 17.08.09 16:24, Maric Michaud wrote:
> robert rottermann a écrit :
>  > I do not see any reference to mark_changed
>  > you have to call it before any transaction.commit() to tell the zope 
> transaction
>  > machinery that it has to commit you changes also.
>  > robert
>  >
>
> In fact, what I understood is that zope.sqlalchemy, by default, bypasses 
> the commit if status is not manually set as 'changed' (see the docstring 
> I quoted in my previous mail). The alternative is to build the 
> SessionExtension with initial_state == STATUS_INVALIDATED.
>
> My point is that it should be the default for a DA, as it is intended to 
> be used mainly by zsql methods which doesn't do nothing to the 
> transaction state.
>   
As author of SQLAlchemyDA I would assume that the transaction integration
works out-of-the-box with Zope - however I have tested SQLAlchemyDA with
the latest zope.sqlalchemy/SQLAlchemy versions. SQLAlchemy together
with the underlying z3c.sqlalchemy/zope.sqlalchemy works with the latest
Zope versions in various projects out-of-the-box using Zope 2.11.

There is one project that required a special

 extension_options={'initial_state':STATUS_CHANGED},

parameter (used for the
scoped_session(extension=ZopeTransactionExtension(**extension_options))
call).

Not sure if this is related to your issue.

Andreas


-- 
ZOPYX Ltd. & Co KG  \  ZOPYX & Friends
Charlottenstr. 37/1  \  The experts for your Python, Zope and
D-72070 Tübingen  \  Plone projects
www.zopyx.com, i...@zopyx.com  \  www.zopyx.de/friends, frie...@zopyx.de

E-Publishing, Python, Zope & Plone development, Consulting


<>___
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] problem with commits in SQLAlchemyDA

2009-08-17 Thread robert rottermann
Maric Michaud schrieb:
> robert rottermann a écrit :
>  > I do not see any reference to mark_changed
>  > you have to call it before any transaction.commit() to tell the zope 
> transaction
>  > machinery that it has to commit you changes also.
>  > robert
>  >
> 
> In fact, what I understood is that zope.sqlalchemy, by default, bypasses 
> the commit if status is not manually set as 'changed' (see the docstring 
> I quoted in my previous mail). The alternative is to build the 
> SessionExtension with initial_state == STATUS_INVALIDATED.
> 
> My point is that it should be the default for a DA, as it is intended to 
> be used mainly by zsql methods which doesn't do nothing to the 
> transaction state.
> 
> Maybe I wasn't clear but the patch works well with my existing zsql code.
> 
it is a longtime that i worked with zsql methods.
however I think the difference is, that zsql handles transactions itself. it
wraps every zqls method in a start/end transaction. pair.

this is similarly done by zope.sqlalchemy. but it will only commit, when you
tell it that the session is dirty by calling mark_changed

import transaction
from zope.sqlalchemy import mark_changed.
here is how I use it
def addKtyp(self, form, commit=1):
"""
create a new ktyp
return id of that ktyp
"""
session = self.getSession()
...

if values:
...
if not ktyp:
...
session.add(ktyp)
# only mark the session, do not  yet commit
self.mark_changed()
if commit:
transaction.commit()
# we only know the id after a commit !!!
ktyp_id = ktyp.ktypid
return ktyp_id

robert
___
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] problem with commits in SQLAlchemyDA

2009-08-17 Thread Maric Michaud
robert rottermann a écrit :
 > I do not see any reference to mark_changed
 > you have to call it before any transaction.commit() to tell the zope 
transaction
 > machinery that it has to commit you changes also.
 > robert
 >

In fact, what I understood is that zope.sqlalchemy, by default, bypasses 
the commit if status is not manually set as 'changed' (see the docstring 
I quoted in my previous mail). The alternative is to build the 
SessionExtension with initial_state == STATUS_INVALIDATED.

My point is that it should be the default for a DA, as it is intended to 
be used mainly by zsql methods which doesn't do nothing to the 
transaction state.

Maybe I wasn't clear but the patch works well with my existing zsql code.

-- 
_

Maric Michaud
___
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] problem with commits in SQLAlchemyDA

2009-08-17 Thread robert rottermann
I do not see any reference to mark_changed
you have to call it before any transaction.commit() to tell the zope transaction
machinery that it has to commit you changes also.
robert

Maric Michaud schrieb:
> Hi all,
> 
> I wanted to use SQALchemyDA with a standalone Zope 2.11 (we only depends 
> on CMFCore).
> 
> i tried to get it up using easy_install, which is pretty 
> straightforward, once removed the incompatible zope.component package 
> needed in the dependencies.
> 
> It ends up with the following installed packages (skipping zope 3 
> components) :
> zope.sqlalchemy-0.4-py2.4.egg
> z3c.sqlalchemy-1.3.10.1-py2.4.egg
> SQLAlchemy-0.5.5-py2.4.egg
> Products.SQLAlchemyDA-0.4.1-py2.4.egg
> 
> At first glance, this works well, but the DA actually can't manage to 
> commit any sql requests (I try only for insert in Mysql and postgres but 
> I'm sure it's always true).
> 
> This is quite an unexpectable behavior for a DA.
> 
> I think the problem is related to this thread I found on tg-trunk 
> newsgroup :
> 
> http://www.mail-archive.com/turbogears-tr...@googlegroups.com/msg07302.html
> 
> There is a misleading comment in the docstring of 
> zope.sqlalchemy.datamanager.join_transaction speaking of a 
> DirtyAfterFlush SessionExtension, which I never seen except in plone code.
> 
> In the last I finally manage to make it work by monkey patching 
> SQLAlchemyDA itself this way :
> 
> 
> try :
>  from Products.SQLAlchemyDA import da
>  from z3c.sqlalchemy import getSAWrapper, createSAWrapper
>  if '0.4.1' in da.__file__ and not hasattr(da.SAWrapper,
>'_patched__wrapper_property') :
>  da.SAWrapper._patched__wrapper_property = da.SAWrapper._wrapper
> 
>  def _always_invalidated_wrapper(self):
>  """The property '_wrapper' patched by CFENet to correct what
>  seems to be a bug in SQLAlchemyDA which prevents any
>  commit."""
>  from zope.sqlalchemy.datamanager import STATUS_INVALIDATED
>  if self.dsn:
>  try:
>  return getSAWrapper(self.util_id)
>  except ValueError:
>  return createSAWrapper(
>self.dsn, forZope=True,
>transactional=self.transactional,
>engine_options={'convert_unicode' :
>  self.convert_unicode,
>'encoding' : self.encoding},
>extension_options={'initial_state': # the whole
> # point is here
>  STATUS_INVALIDATED},
>name=self.util_id)
>  return None
> 
>  da.SAWrapper._wrapper = property(_always_invalidated_wrapper)
> 
> except ImportError :
>  pass
> 
> 
> Anyone has any insights about this problem, any comments on my solution, 
> did it have been reported and corrected, or am I simply missing something ?
> 
> 

___
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] Problem with POST and text/xml (work-around)

2009-07-13 Thread Jonathan (dev101)
Problem:  zope interprets POST requests with a Content-Type of "text/xml" to 
be xmlrpc requests.

Work-around (requires Apache as a reverse proxy): use Apache to re-write the 
Content-Type header of the incoming request before it gets to zope using the 
following directives:

SetEnvIfNoCase Content-Type "text/xml" XMLFLAG
RequestHeader set Content-Type "application/xml" env=XMLFLAG

Zope then sees "text/xml" requests as "application/xml" requests and the xml 
data can then be accessed via "REQUEST['BODY']".

Thanks to Michael H. for the assistance!


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 )


Re: [Zope] Problem with POST and text/xml

2009-07-11 Thread Jonathan (dev101)
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Jonathan (dev101) wrote:
>> Just out of curiosity I ran a test using content-type of 
>> 'application/xml'
>> and zope does not raise the xmlrpc error (as it does with content-type of
>> 'text/xml'), but the POST content is not available within the REQUEST
>> object.
>>
>> This appears to be the same problem that I encountered using a 
>> content-type
>> of 'text/xml' with the xmlrpc test turned off (ie. no xmlrpc error, but 
>> no
>> POST data).
>>
>
> Look into REQUEST['BODY']
>
> Regards
> Michael

Most excellent, thanks!

I am now investing the possibility of using the RequestHeader directive of 
the Apache mod_header module to rewrite the content-type from "text/xml" to 
"application/xml" (we use Apache as a reverse proxy in front of zope).

If i get it to work I'll post the work-around...


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 )


Re: [Zope] Problem with POST and text/xml

2009-07-11 Thread Michael Haubenwallner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonathan (dev101) wrote:
> Just out of curiosity I ran a test using content-type of 'application/xml' 
> and zope does not raise the xmlrpc error (as it does with content-type of 
> 'text/xml'), but the POST content is not available within the REQUEST 
> object.
> 
> This appears to be the same problem that I encountered using a content-type 
> of 'text/xml' with the xmlrpc test turned off (ie. no xmlrpc error, but no 
> POST data).
> 

Look into REQUEST['BODY']

Regards
Michael

- --
http://blog.d2m.at
http://planetzope.org

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKWNBEl0uAvQJUKVYRArGwAJ42T66cvPKgQ8Zd+zt2BPT0QOV+2QCfXAfE
hRGby6U5HvDQ6hp0cZxrzXc=
=O1FU
-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 )


Re: [Zope] Problem with POST and text/xml

2009-07-11 Thread Jonathan (dev101)

"Michael Haubenwallner"  wrote in message 
news:4a5898f5.8040...@d2m.at...
>
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Jonathan (dev101) wrote:
>> I need to support a third party web service (which is not within my 
>> control)
>> that wants to send xml data to my zope server (Zope 2.9.2 running on 
>> Redhat
>> linux).
>>
>> When Zope receives a POST request with a Content-Type of text/xml it 
>> assumes
>> that it is an xmlrpc call (which it is not - it is just passing xml data
>> within the POST request).
>>
>> Is there a way to get Zope to turn off this "xmlrpc assumption" so that 
>> my
>> zope external method can process the xml data that is being passed?
>>
>
> Did you think of using 'application/xml' instead of 'text/xml' ?
> Everything should work as expected.
>
> Regards
> Michael


Just out of curiosity I ran a test using content-type of 'application/xml' 
and zope does not raise the xmlrpc error (as it does with content-type of 
'text/xml'), but the POST content is not available within the REQUEST 
object.

This appears to be the same problem that I encountered using a content-type 
of 'text/xml' with the xmlrpc test turned off (ie. no xmlrpc error, but no 
POST data).

Does zope only make POST data available within the REQUEST object if the 
content-type is set to "application/x-www-form-urlencoded" or 
"multipart/form-data"?

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 )


Re: [Zope] Problem with POST and text/xml

2009-07-11 Thread Jonathan (dev101)
As a quick test I modified HTTPRequest.py to turn off the zope assumption 
that all POST requests with content-type of text/xml are xmlrpc requests.

This had the effect of eliminating the xmlrpc error that zope was raising, 
but a side effect is that the xml data is not available within the REQUEST 
object.

I don't think the patch submitted for bug 373663 will fix this behaviour 
(ie. it will resolve the xmlrpc error, but it won't make the xml data 
contained within the POST request available).

Any ideas on how to get access to the xml data?!  (and re-writing the entire 
app with Grok is not something I really want to do!)

Thanks,

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 )


Re: [Zope] Problem with POST and text/xml

2009-07-11 Thread Jonathan (dev101)

- Original Message - 
From: "Michael Haubenwallner" 
To: 
Sent: Saturday, July 11, 2009 9:51 AM
Subject: Re: [Zope] Problem with POST and text/xml


> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Jonathan (dev101) wrote:
>> I need to support a third party web service (which is not within my 
>> control)
>> that wants to send xml data to my zope server (Zope 2.9.2 running on 
>> Redhat
>> linux).
>>
>> When Zope receives a POST request with a Content-Type of text/xml it 
>> assumes
>> that it is an xmlrpc call (which it is not - it is just passing xml data
>> within the POST request).
>>
>> Is there a way to get Zope to turn off this "xmlrpc assumption" so that 
>> my
>> zope external method can process the xml data that is being passed?
>>
>
> Did you think of using 'application/xml' instead of 'text/xml' ?
> Everything should work as expected.
>
> Regards
> Michael

The POST requests are coming from a third party web service (which we don't 
control, and they have lots of other users) and they won't change the 
content-type just for us to work around a zope bug (sigh).






___
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] Problem with POST and text/xml

2009-07-11 Thread Michael Haubenwallner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonathan (dev101) wrote:
> I need to support a third party web service (which is not within my control) 
> that wants to send xml data to my zope server (Zope 2.9.2 running on Redhat 
> linux).
> 
> When Zope receives a POST request with a Content-Type of text/xml it assumes 
> that it is an xmlrpc call (which it is not - it is just passing xml data 
> within the POST request).
> 
> Is there a way to get Zope to turn off this "xmlrpc assumption" so that my 
> zope external method can process the xml data that is being passed?
> 

Did you think of using 'application/xml' instead of 'text/xml' ?
Everything should work as expected.

Regards
Michael

- --
http://blog.d2m.at
http://planetzope.org

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKWJj1l0uAvQJUKVYRAlZDAJ9a6wbEnRafVew2jPUttRmNjQKAtQCgh98/
kPSyOmTTHGBUSPmPy0V6Trw=
=s15f
-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 )


Re: [Zope] Problem with POST and text/xml

2009-07-11 Thread Andreas Jung
On 11.07.09 15:22, Jonathan (dev101) wrote:
>
> There were some differences between my Zope 2.9.2 installation and the patch 
> instructions:
>
>   
Zope 2.9 is pretty much out-of-date.

-aj

-- 
ZOPYX Ltd. & Co KG  \  ZOPYX & Friends
Charlottenstr. 37/1  \  Das Expertennetzwerk für Python, Zope
D-72070 Tübingen  \  und Plone Projekte
www.zopyx.com, i...@zopyx.com  \  www.zopyx.de/friends, frie...@zopyx.de

E-Publishing, Python, Zope & Plone development, Consulting


begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:i...@zopyx.com
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

___
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] Problem with POST and text/xml

2009-07-11 Thread Jonathan (dev101)

>- Original Message - 
>From: "Andreas Jung" 
>To: "Jonathan (dev101)" 
>Cc: 
>Sent: Friday, July 10, 2009 4:30 PM
>Subject: Re: [Zope] Problem with POST and text/xml
>

> https://bugs.launchpad.net/zope2/+bug/373663
>
> -aj
>
> On 10.07.09 21:24, Jonathan (dev101) wrote:
>> I need to support a third party web service (which is not within my 
>> control)
>> that wants to send xml data to my zope server (Zope 2.9.2 running on 
>> Redhat
>> linux).
>>
>> When Zope receives a POST request with a Content-Type of text/xml it 
>> assumes
>> that it is an xmlrpc call (which it is not - it is just passing xml data
>> within the POST request).
>>
>> Is there a way to get Zope to turn off this "xmlrpc assumption" so that 
>> my
>> zope external method can process the xml data that is being passed?
>>
>>
>> Thanks,
>>
>> Jonathan

Thanks for the link!

There were some differences between my Zope 2.9.2 installation and the patch 
instructions:

1) There was no interfaces.py file in the ZPublisher source directory (so I 
created a new one)
2) There were some differences in the HTTPRequest.py file, but it was still 
possible to make the changes indicated in the patch instructions.

I restarted Zope via the ZMI, and ran a test (which generated a 500 response 
error). I noticed that there were no pyc/pyo files for interfaces.py and 
HTTPRequest.py, so I created them manually using py_compile.

I restarted Zope and ran another test (using wget to simulate a POST request 
containing xml data) and got a 503 response:

---response begin---
HTTP/1.0 503 Service Unavailable
Server: Zope/(Zope 2.9.2-, python 2.4.2, linux2) ZServer/1.1
Date: Sat, 11 Jul 2009 14:04:08 GMT
Bobo-Exception-Line: 402
Content-Length: 995
Bobo-Exception-Value: See the server error log for details
Content-Type: text/html; charset=iso-8859-15
Bobo-Exception-Type: NameError
Connection: Keep-Alive
Bobo-Exception-File: HTTPRequest.py


There were no entries in Z2.log or event.log.

Other than manually creating pyc/pyo files and re-starting zope, is there 
anything else I need to do to implement the changes to interfaces.py and 
HTTPRequest.py?  If not, any ideas as to what could be causing this error or 
how I could go about debugging it?


Thanks,

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 )


Re: [Zope] Problem with POST and text/xml

2009-07-11 Thread Peter Bengtsson
Roughly because of this I ended up writing the web service part of the
app in Grok instead of Zope.

2009/7/10 Jonathan (dev101) :
> I need to support a third party web service (which is not within my control)
> that wants to send xml data to my zope server (Zope 2.9.2 running on Redhat
> linux).
>
> When Zope receives a POST request with a Content-Type of text/xml it assumes
> that it is an xmlrpc call (which it is not - it is just passing xml data
> within the POST request).
>
> Is there a way to get Zope to turn off this "xmlrpc assumption" so that my
> zope external method can process the xml data that is being passed?
>
>
> Thanks,
>
> Jonathan
>
>
> P.S.  details of a wget session that illustrate the error being generated
> follows:
>
> Setting --header (header) to Content-Type: text/xml
> Setting --post-data (postdata) to  ?>
> 
>  235006
>  1160
>  test #27
>  2007-09-14 15:52:59
>  +11234567890
>  26
>  Sprint
>  5
>  
> DEBUG output created by Wget 1.10.2 (Red Hat modified) on linux-gnu.
>
> --16:12:28--  http://192.168.123.2:8080/Coz/Process3Ci
>           => `Process3Ci.1'
> Connecting to 192.168.123.2:8080... connected.
> Created socket 3.
> Releasing 0x00638c60 (new refcount 0).
> Deleting unused 0x00638c60.
>
> ---request begin---
> POST /Coz/Process3Ci HTTP/1.0
> User-Agent: Wget/1.10.2 (Red Hat modified)
> Accept: */*
> Host: 192.168.123.2:8080
> Connection: Keep-Alive
> Content-Type: text/xml
> Content-Length: 390
>
> ---request end---
> [POST data: 
> 
>  235006
>  1160
>  test #27
>  2007-09-14 15:52:59
>  +11234567890
>  26
>  Sprint
>  5
>  ]
> HTTP request sent, awaiting response...
> ---response begin---
> HTTP/1.0 500 Internal Server Error
> Server: Zope/(Zope 2.9.2-, python 2.4.2, linux2) ZServer/1.1
> Date: Fri, 10 Jul 2009 20:12:28 GMT
> Bobo-Exception-Line: 742
> Content-Length: 849
> Bobo-Exception-Value: See the server error log for details
> Content-Type: text/html; charset=iso-8859-15
> Bobo-Exception-Type: ResponseError
> Connection: Keep-Alive
> Bobo-Exception-File: xmlrpclib.py
>
> ---response end---
> 500 Internal Server Error
> Registered socket 3 for persistent reuse.
>
>
> ___
> Zope maillist  -  z...@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 )
>



-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
fun crosstips.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 )


Re: [Zope] Problem with POST and text/xml

2009-07-10 Thread Andreas Jung
https://bugs.launchpad.net/zope2/+bug/373663

-aj

On 10.07.09 21:24, Jonathan (dev101) wrote:
> I need to support a third party web service (which is not within my control) 
> that wants to send xml data to my zope server (Zope 2.9.2 running on Redhat 
> linux).
>
> When Zope receives a POST request with a Content-Type of text/xml it assumes 
> that it is an xmlrpc call (which it is not - it is just passing xml data 
> within the POST request).
>
> Is there a way to get Zope to turn off this "xmlrpc assumption" so that my 
> zope external method can process the xml data that is being passed?
>
>
> Thanks,
>
> Jonathan
>
>
> P.S.  details of a wget session that illustrate the error being generated 
> follows:
>
> Setting --header (header) to Content-Type: text/xml
> Setting --post-data (postdata) to  ?>
> 
>   235006
>   1160
>   test #27
>   2007-09-14 15:52:59
>   +11234567890
>   26
>   Sprint
>   5
>  
> DEBUG output created by Wget 1.10.2 (Red Hat modified) on linux-gnu.
>
> --16:12:28--  http://192.168.123.2:8080/Coz/Process3Ci
>=> `Process3Ci.1'
> Connecting to 192.168.123.2:8080... connected.
> Created socket 3.
> Releasing 0x00638c60 (new refcount 0).
> Deleting unused 0x00638c60.
>
> ---request begin---
> POST /Coz/Process3Ci HTTP/1.0
> User-Agent: Wget/1.10.2 (Red Hat modified)
> Accept: */*
> Host: 192.168.123.2:8080
> Connection: Keep-Alive
> Content-Type: text/xml
> Content-Length: 390
>
> ---request end---
> [POST data: 
> 
>   235006
>   1160
>   test #27
>   2007-09-14 15:52:59
>   +11234567890
>   26
>   Sprint
>   5
>  ]
> HTTP request sent, awaiting response...
> ---response begin---
> HTTP/1.0 500 Internal Server Error
> Server: Zope/(Zope 2.9.2-, python 2.4.2, linux2) ZServer/1.1
> Date: Fri, 10 Jul 2009 20:12:28 GMT
> Bobo-Exception-Line: 742
> Content-Length: 849
> Bobo-Exception-Value: See the server error log for details
> Content-Type: text/html; charset=iso-8859-15
> Bobo-Exception-Type: ResponseError
> Connection: Keep-Alive
> Bobo-Exception-File: xmlrpclib.py
>
> ---response end---
> 500 Internal Server Error
> Registered socket 3 for persistent reuse.
>
>
> ___
> 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 )
>   


-- 
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: i...@zopyx.com - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK

E-Publishing, Python, Zope & Plone development, Consulting


begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:i...@zopyx.com
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

___
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] problem accessing object as anonymous

2009-04-22 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

robert rottermann wrote:

>> while debugging I found out, that the __roles__ property of a given document 
>> is
>> a tuple of the form
>> ('GroupMember', 'Guest', 'Manager', 'FolderManager', 'Owner')
>>
>> if I copy the same document to a vanilla plone site its __roles__ property is
>> ['Anonymous', 'Manager', 'Reviewer', 'Manager', 'Anonymous']
>>
> 
> I found out more: this dropping of 'Anonymous' and converting to a
> tuple only happens when I use our own workflow. if I use the standard
> plone workflow so I wonder, what can provoke this?

The "tuple" form is how the classic Z2 security policy spells "don't
acquire" under the hood (it goes all the way back to bobo, I think).
My guess is that the state in your custom workflow has the 'acquire'
flag unchecked:  you need either to add permissions for Anonymous on
that state, or else check the "acquire" checkbox.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJ7z0i+gerLs4ltQ4RAgh/AKDO7d13bqX3dW5BvsoYSryGNDyGEwCgq8bp
1Y3ds5ROL1n5qyBZelIObDw=
=oG9u
-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 )


Re: [Zope] problem accessing object as anonymous

2009-04-22 Thread robert rottermann

robert rottermann schrieb:
> Hi there,
> I try to find out, why  in an intranet accessing an object from a link sendt 
> by
> email is not possible.
> situation:
> a user from a plone intranet sends a link to a dokument within the intranet 
> to a
> colleague.
> if that colleague clicks on the link while *not logged* into the intranet she 
> is
> presented with the *browser* login box repeatedly. entering the credential 
> does
> not help.
> the error log shows that access to the document is forbidden for the document
> for the user Anonymous
> 
> while debugging I found out, that the __roles__ property of a given document 
> is
> a tuple of the form
> ('GroupMember', 'Guest', 'Manager', 'FolderManager', 'Owner')
> 
> if I copy the same document to a vanilla plone site its __roles__ property is
> ['Anonymous', 'Manager', 'Reviewer', 'Manager', 'Anonymous']
> 

I found out more:
this dropping of 'Anonymous' and converting to a tuple only happens when I use
our own workflow.
if I use the standard plone workflow so I wonder, what can provoke this?

robert

> 
> I have the impression, that when 'Anonymous' is part of __roles__, access to 
> the
> object is possible. without it, access fails.
> 
> now my questions:
> is the assumption, that the failed acces is caused by the missing 'Anonymous'
> role in __roles__ correct?
> 
> if yes: what controls the setting of __roles__
> 
> if not: what could be the reason of the fact, that users are not presented the
> cookieCrumbler-base plone login is not presented?
> 
> thanks very much for your help
> robert
___
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] problem accessing object as anonymous

2009-04-22 Thread robert rottermann
oh, I am using plone 2.5x here with Zope 2.9.8-final, python 2.4.6, linux2
robert
robert rottermann schrieb:
> Hi there,
> I try to find out, why  in an intranet accessing an object from a link sendt 
> by
> email is not possible.
> situation:
> a user from a plone intranet sends a link to a dokument within the intranet 
> to a
> colleague.
> if that colleague clicks on the link while *not logged* into the intranet she 
> is
> presented with the *browser* login box repeatedly. entering the credential 
> does
> not help.
> the error log shows that access to the document is forbidden for the document
> for the user Anonymous
> 
> while debugging I found out, that the __roles__ property of a given document 
> is
> a tuple of the form
> ('GroupMember', 'Guest', 'Manager', 'FolderManager', 'Owner')
> 
> if I copy the same document to a vanilla plone site its __roles__ property is
> ['Anonymous', 'Manager', 'Reviewer', 'Manager', 'Anonymous']
> 
> 
> I have the impression, that when 'Anonymous' is part of __roles__, access to 
> the
> object is possible. without it, access fails.
> 
> now my questions:
> is the assumption, that the failed acces is caused by the missing 'Anonymous'
> role in __roles__ correct?
> 
> if yes: what controls the setting of __roles__
> 
> if not: what could be the reason of the fact, that users are not presented the
> cookieCrumbler-base plone login is not presented?
> 
> thanks very much for your help
> robert
> 
> 
> 
> ___
> 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 )


Re: [Zope] problem with a form in IE 7

2008-12-15 Thread Garry Saddington
On Monday 15 December 2008 15:04, Peter Bengtsson wrote:
> 2008/12/15  :
> > Quoting Peter Bengtsson :
> >> Has nothing to do with Zope but...
> >> Use Firefox to debug it and you'll get to see the error.
> >> put method="post" on form tag and the submission won't be visible in the
> >> URL.
> >
> > I've had this happen with method=get in the past. Changing to post fixed
> > it but...
> > May be worth checking zope.conf:
> >
> > Directive: http-header-max-length
> > #
> > # Description:
> > # Maximum number of bytes allowed within a HTTP request header. The
> > request
> > # is discarded and considered as a DoS attack if the header size
> > exceeds # this limit.
> > #
> > # Default: 8192
> > #
> > # Example:
> > #
> > # http-header-max-length 16384
>
> No. Don't fiddle with that. Get the form right. That's the basics.
> It might be worth reading up and understanding the basic difference
> between POST and GET and which to use when.

I wasn't suggesting that he fiddles with it, but that someone else may have 
already fiddled, so therefore to check that the default was still extant.

Regards
 Garry
___
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] problem with a form in IE 7

2008-12-15 Thread Peter Bengtsson
2008/12/15  :
> Quoting Peter Bengtsson :
>
>> Has nothing to do with Zope but...
>> Use Firefox to debug it and you'll get to see the error.
>> put method="post" on form tag and the submission won't be visible in the URL.
> I've had this happen with method=get in the past. Changing to post fixed it
> but...
> May be worth checking zope.conf:
>
> Directive: http-header-max-length
> #
> # Description:
> # Maximum number of bytes allowed within a HTTP request header. The
> request
> # is discarded and considered as a DoS attack if the header size exceeds
> # this limit.
> #
> # Default: 8192
> #
> # Example:
> #
> # http-header-max-length 16384
>

No. Don't fiddle with that. Get the form right. That's the basics.
It might be worth reading up and understanding the basic difference
between POST and GET and which to use when.

> Regards
> Garry
>>
>> 2008/12/11 C :
>>> We are running Zope 2.9.8 on Macintosh OS X Server 10.5.5 behind Apache 2.x.
>>>
>>> I am having a problem when trying to submit one of my forms in IE 7.  This
>>> only happens on Windows XP and it only started happening recently (we think
>>> in the past week).
>>>
>>> The form contains several select boxes.  When the user selects a value from
>>> one of the select boxes, it submits the form and processes the selection.
>>> The error I receive is an IE error that says:"Internet Explorer Cannot
>>> Display the Webpage".
>>> And for some reason, all of my selectbox values are showing in the URL as
>>> parameters.   This is not supposed to happen.   If I remove the parameters
>>> from the URL line and press enter, it works fine.
>>>
>>> I have another page that works similar to this one (with multiple select
>>> boxes that submit the form upon selection), that doesn't experience the same
>>> problem.
>>>
>>> I even changed my form action to go to a plain html page, and it still tries
>>> to pass all of my form variables in the URL string.
>>>
>>> I went to Microsoft's trouble shooting page for this error.  I've tried
>>> deleting my browser history, clearing out any cached items, and also
>>> re-starting IE without "Add-Ons".  The server has been restarted as well.
>>> None of these options have resolved the issue.
>>>
>>> Neither the Apache log nor the Zope error log shows these errors.
>>> Has anyone encountered this problem?  If so, what have you done to resolve
>>> the issue?
>>> ___
>>> 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 )
>>>
>>>
>>
>>
>>
>> --
>> Peter Bengtsson,
>> work www.fry-it.com
>> home www.peterbe.com
>> hobby www.issuetrackerproduct.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 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 )
>



-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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] problem with a form in IE 7

2008-12-15 Thread garry
Quoting Peter Bengtsson :

> Has nothing to do with Zope but...
> Use Firefox to debug it and you'll get to see the error.
> put method="post" on form tag and the submission won't be visible in the URL.
I've had this happen with method=get in the past. Changing to post fixed it
but...
May be worth checking zope.conf:

Directive: http-header-max-length
#
# Description:
# Maximum number of bytes allowed within a HTTP request header. The 
request
# is discarded and considered as a DoS attack if the header size exceeds
# this limit.
#
# Default: 8192
#
# Example:
#
# http-header-max-length 16384

Regards
Garry
>
> 2008/12/11 C :
>> We are running Zope 2.9.8 on Macintosh OS X Server 10.5.5 behind Apache 2.x.
>>
>> I am having a problem when trying to submit one of my forms in IE 7.  This
>> only happens on Windows XP and it only started happening recently (we think
>> in the past week).
>>
>> The form contains several select boxes.  When the user selects a value from
>> one of the select boxes, it submits the form and processes the selection.
>> The error I receive is an IE error that says:"Internet Explorer Cannot
>> Display the Webpage".
>> And for some reason, all of my selectbox values are showing in the URL as
>> parameters.   This is not supposed to happen.   If I remove the parameters
>> from the URL line and press enter, it works fine.
>>
>> I have another page that works similar to this one (with multiple select
>> boxes that submit the form upon selection), that doesn't experience the same
>> problem.
>>
>> I even changed my form action to go to a plain html page, and it still tries
>> to pass all of my form variables in the URL string.
>>
>> I went to Microsoft's trouble shooting page for this error.  I've tried
>> deleting my browser history, clearing out any cached items, and also
>> re-starting IE without "Add-Ons".  The server has been restarted as well.
>> None of these options have resolved the issue.
>>
>> Neither the Apache log nor the Zope error log shows these errors.
>> Has anyone encountered this problem?  If so, what have you done to resolve
>> the issue?
>> ___
>> 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 )
>>
>>
>
>
>
> --
> Peter Bengtsson,
> work www.fry-it.com
> home www.peterbe.com
> hobby www.issuetrackerproduct.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 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] problem with a form in IE 7

2008-12-15 Thread Peter Bengtsson
Has nothing to do with Zope but...
Use Firefox to debug it and you'll get to see the error.
put method="post" on form tag and the submission won't be visible in the URL.

2008/12/11 C :
> We are running Zope 2.9.8 on Macintosh OS X Server 10.5.5 behind Apache 2.x.
>
> I am having a problem when trying to submit one of my forms in IE 7.  This
> only happens on Windows XP and it only started happening recently (we think
> in the past week).
>
> The form contains several select boxes.  When the user selects a value from
> one of the select boxes, it submits the form and processes the selection.
> The error I receive is an IE error that says:"Internet Explorer Cannot
> Display the Webpage".
> And for some reason, all of my selectbox values are showing in the URL as
> parameters.   This is not supposed to happen.   If I remove the parameters
> from the URL line and press enter, it works fine.
>
> I have another page that works similar to this one (with multiple select
> boxes that submit the form upon selection), that doesn't experience the same
> problem.
>
> I even changed my form action to go to a plain html page, and it still tries
> to pass all of my form variables in the URL string.
>
> I went to Microsoft's trouble shooting page for this error.  I've tried
> deleting my browser history, clearing out any cached items, and also
> re-starting IE without "Add-Ons".  The server has been restarted as well.
> None of these options have resolved the issue.
>
> Neither the Apache log nor the Zope error log shows these errors.
> Has anyone encountered this problem?  If so, what have you done to resolve
> the issue?
> ___
> 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 )
>
>



-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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] problem with a form in IE 7

2008-12-15 Thread C
It turns out that Internet Explorer doesn't like it when you pass more than
141 form variables with a single submit. Our site collects employment
applications and once we hit 142 applications the page broke for anyone
using IE7 on XP.

On Thu, Dec 11, 2008 at 10:17 AM, C  wrote:

> We are running Zope 2.9.8 on Macintosh OS X Server 10.5.5 behind Apache
> 2.x.
>
> I am having a problem when trying to submit one of my forms in IE 7.  This
> only happens on Windows XP and it only started happening recently (we think
> in the past week).
>
> The form contains several select boxes.  When the user selects a value from
> one of the select boxes, it submits the form and processes the selection.
> The error I receive is an IE error that says:"Internet Explorer Cannot
> Display the Webpage".
> And for some reason, all of my selectbox values are showing in the URL as
> parameters.   This is not supposed to happen.   If I remove the parameters
> from the URL line and press enter, it works fine.
>
> I have another page that works similar to this one (with multiple select
> boxes that submit the form upon selection), that doesn't experience the same
> problem.
>
> I even changed my form action to go to a plain html page, and it still
> tries to pass all of my form variables in the URL string.
>
> I went to Microsoft's trouble shooting page for this error.  I've tried
> deleting my browser history, clearing out any cached items, and also
> re-starting IE without "Add-Ons".  The server has been restarted as well.
> None of these options have resolved the issue.
>
> Neither the Apache log nor the Zope error log shows these errors.
>
> Has anyone encountered this problem?  If so, what have you done to resolve
> the issue?
>
___
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] Problem using dtml-in in ZSQL method

2008-12-13 Thread Jaroslav Lukesh
first, convert mylist to string before calling ZSQL method:



And then call the ZSQL method:


strmylist:string="[0]"


SELECT *
FROM MyTable
WHERE
  id in
()


- Original Message - 
From: Françoise CONIL
To: zope@zope.org
Sent: Thursday, December 11, 2008 11:21 AM
Subject: [Zope] Problem using dtml-in in ZSQL method


Hello,

My ZSQL method receive a *mylist* parameter that should be an integer list : 
[21,35]

The following code does not work :

SELECT *
FROM MyTable
WHERE
  id in
(
 ,
)


*Type de l'erreur*
NameError
*Valeur de l'erreur*
'client' may not be used as an argument name in this context

This other code does not work better :

SELECT *
FROM MyTable
WHERE
  id in
(
 ,
)

*Same error*

However, if I use a dictionary list of this type [{'id':21},{'id':35}]  with 
the following code, it works (but it's heavy)

SELECT *
FROM MyTable
WHERE
  id in
(
 ,
)

The python script that calls my ZSQL method has already build the integer 
list and I would like to use it as is.

Thanks for your help




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


Re: [Zope] Problem using dtml-in in ZSQL method

2008-12-12 Thread Françoise CONIL
You're right but even with a WHERE statement I get the same programming
error, I have to use the dtml-sqlgroup statement

Françoise

2008/12/12 Andrew Milton 

> +---[ Fran?oise CONIL ]--
> | Trying :
> |
> | select * from mytable  column=id>
>
>
> select * from mytable WHERE 
>  ^
>
> Missed a where statement...
>
> | Thanks for your reply
>
> No problem.
>
> --
> Andrew Milton
> a...@theinternet.com.au
>
___
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] Problem using dtml-in in ZSQL method

2008-12-12 Thread Andrew Milton
+---[ Fran?oise CONIL ]--
| Trying :
| 
| select * from mytable 


select * from mytable WHERE 
  ^

Missed a where statement... 

| Thanks for your reply

No problem.

-- 
Andrew Milton
a...@theinternet.com.au
___
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] Problem using dtml-in in ZSQL method

2008-12-12 Thread Françoise CONIL
Trying :

select * from mytable 

did not work, it generates a ProgrammingError

   - Module Shared.DC.ZRDB.DA, line 374, in __call__
   - Module Products.ZMySQLDA.db, line 273, in query

ProgrammingError: (1064, "You have an error in your SQL syntax. Check the
manual that corresponds to your MySQL server version for the right syntax to
use near ' LIMIT 1000'")

My problem was that I tried to test my Z SQL method through the ZMI, testing
with a python script worked fine with the following Z SQL method :
SELECT *
FROM MyTable

  
 I also modified the "mylist" parameter declaration to
specify that it is a list of integers which is set to none if no parameter
is passed.

   liste:list:int=none
Thanks for your reply
___
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] Problem using dtml-in in ZSQL method

2008-12-11 Thread Andrew Milton
+---[ Andrew Milton ]--
| | - Original Message - 
| | From: Fran?oise CONIL
| | To: zope@zope.org
| | Sent: Thursday, December 11, 2008 11:21 AM
| | Subject: [Zope] Problem using dtml-in in ZSQL method
| | 
| | 
| | Hello,
| | 
| | My ZSQL method receive a *mylist* parameter that should be an integer list :
| | [21,35]
| | 
| | The following code does not work :
| | 
| | SELECT *
| | FROM MyTable
| | WHERE
| |   id in
| | (
| |  ,
| | )
| 
| select * from mytable
| 
| 
| 

Actually the sqlgroup is superfluous in this case;

name your "mylist" parameter as "id" 
and
select * from mytable 

or if you don't want to rename your parameter

select * from mytable 

should work fine

-- 
Andrew Milton
a...@theinternet.com.au
___
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] Problem using dtml-in in ZSQL method

2008-12-11 Thread Andrew Milton
| - Original Message - 
| From: Fran?oise CONIL
| To: zope@zope.org
| Sent: Thursday, December 11, 2008 11:21 AM
| Subject: [Zope] Problem using dtml-in in ZSQL method
| 
| 
| Hello,
| 
| My ZSQL method receive a *mylist* parameter that should be an integer list :
| [21,35]
| 
| The following code does not work :
| 
| SELECT *
| FROM MyTable
| WHERE
|   id in
| (
|  ,
| )

select * from mytable




-- 
Andrew Milton
a...@theinternet.com.au
___
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] Problem using dtml-in in ZSQL method

2008-12-11 Thread Jaroslav Lukesh
first, convert mylist to string before calling ZSQL method:



And then call the ZSQL method:


strmylist:string="[0]"


SELECT *
FROM MyTable
WHERE
  id in
()


- Original Message - 
From: Françoise CONIL
To: zope@zope.org
Sent: Thursday, December 11, 2008 11:21 AM
Subject: [Zope] Problem using dtml-in in ZSQL method


Hello,

My ZSQL method receive a *mylist* parameter that should be an integer list :
[21,35]

The following code does not work :

SELECT *
FROM MyTable
WHERE
  id in
(
 ,
)


*Type de l'erreur*
NameError
*Valeur de l'erreur*
'client' may not be used as an argument name in this context

This other code does not work better :

SELECT *
FROM MyTable
WHERE
  id in
(
 ,
)

*Same error*

However, if I use a dictionary list of this type [{'id':21},{'id':35}]  with
the following code, it works (but it's heavy)

SELECT *
FROM MyTable
WHERE
  id in
(
 ,
)

The python script that calls my ZSQL method has already build the integer
list and I would like to use it as is.

Thanks for your help




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


Re: [Zope] Problem using dtml-in in ZSQL method

2008-12-11 Thread Jeff Peterson
Shouldn't this:  be  ?

--
Jeffrey D Peterson
Webmaster
Crary Industries, Inc.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Françoise CONIL
Sent: Thursday, December 11, 2008 4:21 AM
To: zope@zope.org
Subject: [Zope] Problem using dtml-in in ZSQL method

Hello,

My ZSQL method receive a *mylist* parameter that should be an integer list : 
[21,35]

The following code does not work :

SELECT *
FROM MyTable
WHERE
  id in
(
 ,
)
*Type de l'erreur*
NameError
*Valeur de l'erreur*
'client' may not be used as an argument name in this context

This other code does not work better :

SELECT *
FROM MyTable
WHERE
  id in
(
 ,
)

*Same error*

However, if I use a dictionary list of this type [{'id':21},{'id':35}]  with 
the following code, it works (but it's heavy)

SELECT *
FROM MyTable
WHERE
  id in
(
 ,
)

The python script that calls my ZSQL method has already build the integer list 
and I would like to use it as is.

Thanks for your help
___
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] problem with a form in IE 7

2008-12-11 Thread garry
Quoting C <[EMAIL PROTECTED]>:

> We are running Zope 2.9.8 on Macintosh OS X Server 10.5.5 behind Apache 2.x.
>
> I am having a problem when trying to submit one of my forms in IE 7.  This
> only happens on Windows XP and it only started happening recently (we think
> in the past week).
>
> The form contains several select boxes.  When the user selects a value from
> one of the select boxes, it submits the form and processes the selection.
> The error I receive is an IE error that says:"Internet Explorer Cannot
> Display the Webpage".
> And for some reason, all of my selectbox values are showing in the URL as
> parameters.   This is not supposed to happen.   If I remove the parameters
> from the URL line and press enter, it works fine.
>
> I have another page that works similar to this one (with multiple select
> boxes that submit the form upon selection), that doesn't experience the same
> problem.
>
> I even changed my form action to go to a plain html page, and it still tries
> to pass all of my form variables in the URL string.
>
> I went to Microsoft's trouble shooting page for this error.  I've tried
> deleting my browser history, clearing out any cached items, and also
> re-starting IE without "Add-Ons".  The server has been restarted as well.
> None of these options have resolved the issue.
>
> Neither the Apache log nor the Zope error log shows these errors.
>
> Has anyone encountered this problem?  If so, what have you done to resolve
> the issue?
>
Our uses are recommended to use Firefox, all these sorts of problems go away
very quickly.
Regards
Garry


___
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] problem with ms sql server

2008-12-02 Thread Dieter Maurer
Miguel Beltran R. wrote at 2008-12-1 11:13 -0600:
>I have a zsql where made a UPDATE and INSERT, I need know when happen a
>error to show.
>I using pyodbc 2.0.58, zpyodbcda 1.0.6 and ms sql server 2000
>
>[zsql with error after render: actualiza_info ]
>SET XACT_ABORT ON
>BEGIN TRANSACTION
>UPDATE taller SET
>comercial = ''
>where taller = 1

I would expect the need of a command separator (here at least and maybe after
earlier commands as well).

>insert into taller_movimiento (estado, taller, fecha, asunto, observacion
>) values(
>'14',
>1,
>'', <--This must be not blank
>'',
>''
>)
>COMMIT TRANSACTION
>
>
>[dtml method]
>
>   
>   All Ok
>
>   Error, but not showed :(
>

Omit the "dtml-try" (why does it end with "/dtml-if"?) and see
whether you get more information.



-- 
Dieter
___
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] problem with ms sql server

2008-12-01 Thread Jaroslav Lukesh
Hi,

It should sounds courious, but try to manually rewrite (ie., do not 
copy&paste!) your ZSQL method. MSSQL and Sybase servers are sometimes 
sensitive to unvisible characters and query does not work and you does not 
know why.

- Original Message - 
From: Miguel Beltran R.

I have a zsql where made a UPDATE and INSERT, I need know when happen a 
error to show.
I using pyodbc 2.0.58, zpyodbcda 1.0.6 and ms sql server 2000


___
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] Problem using nested dtml-in with zsql

2008-11-11 Thread Miguel Beltran R.
I resolve my problem modifying file
C:\Zope\2.11.1\Zope\lib\python\DocumentTemplate\DT_InSV.py

Method __getitem__

Changing
if l < 0:
alt_prefix = self.alt_prefix
if not (alt_prefix and key.startswith(alt_prefix)):
raise KeyError, key

suffix = key[len(alt_prefix):].replace('_', '-')
if '-' in suffix:
try: return self[suffix]
except KeyError: pass
prefix = 'sequence'
key = 'sequence-' + suffix
else:
suffix=key[l+1:]
prefix=key[:l]

TO
if l < 0:
alt_prefix = self.alt_prefix
if not (alt_prefix and key.startswith(alt_prefix)):
raise KeyError, key

suffix = key[len(alt_prefix):].replace('_', '-', 1)<
changed to just one time replace
#too my
variable have a '_' and is bad replace
#if '-' in suffix: <-- what do it? the
original suffix always have '-'
#try: return self[suffix]
#except KeyError: pass
prefix = 'sequence'
key = 'sequence-' + suffix
try:return self[key]  <-- the difference with the
return above is what suffix
except KeyError: pass#have 'var-region_nombre and
here is 'sequence-var-region_region'
else:
suffix=key[l+1:]
prefix=key[:l]



All work fine until now

2008/11/10 Miguel Beltran R. <[EMAIL PROTECTED]>

> The application is already designed with dtml. This is a little change.
> Before I rename it the fields in zsql to avoid conflicts.
>
>
>
> 2008/11/8 Andreas Jung <[EMAIL PROTECTED]>
>
> Any particular reason for using DTML instead of ZPT? DTML is dead.
>>
>> -aj
>>
>>
>> On 06.11.2008 20:53 Uhr, Miguel Beltran R. wrote:
>>
>>> Hi list
>>>
>>> After read http://plope.com/Books/2_7Edition/AppendixA.stx#2-19 I tried
>>> use two dtml-in for get information from zsql diferents, but say "This
>>> resource may be trying to reference a nonexistent object or variable
>>> *'x_var_region'*."
>>>
>>> what is missing?
>>>
>>> The first dtml-in (prefix="q") only return one record.
>>> The second dtml-in return 12 records.
>>>
>>> [code]
>>> >> prefix="q">
>>> 
>>> >> name="main_form">
>>> 
>>>
>>> 
>>> REGION
>>> 
>>> 
>>> >> selected
>>>  >
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>> 
>>> --
>>> 
>>> Lo bueno de vivir un dia mas
>>> es saber que nos queda un dia menos de vida
>>>
>>>
>>> 
>>>
>>> ___
>>> 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 )
>>>
>>
>>
>> --
>> ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
>> Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
>> Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
>> Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
>> 
>> E-Publishing, Python, Zope & Plone development, Consulting
>>
>>
>
>
> --
> 
> Lo bueno de vivir un dia mas
> es saber que nos queda un dia menos de vida
>



-- 

Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida
___
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] Problem using nested dtml-in with zsql

2008-11-10 Thread Miguel Beltran R.
The application is already designed with dtml. This is a little change.
Before I rename it the fields in zsql to avoid conflicts.



2008/11/8 Andreas Jung <[EMAIL PROTECTED]>

> Any particular reason for using DTML instead of ZPT? DTML is dead.
>
> -aj
>
>
> On 06.11.2008 20:53 Uhr, Miguel Beltran R. wrote:
>
>> Hi list
>>
>> After read http://plope.com/Books/2_7Edition/AppendixA.stx#2-19 I tried
>> use two dtml-in for get information from zsql diferents, but say "This
>> resource may be trying to reference a nonexistent object or variable
>> *'x_var_region'*."
>>
>> what is missing?
>>
>> The first dtml-in (prefix="q") only return one record.
>> The second dtml-in return 12 records.
>>
>> [code]
>> > prefix="q">
>> 
>> > name="main_form">
>> 
>>
>> 
>> REGION
>> 
>> 
>> > selected
>>  >
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> --
>> 
>> Lo bueno de vivir un dia mas
>> es saber que nos queda un dia menos de vida
>>
>>
>> 
>>
>> ___
>> 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 )
>>
>
>
> --
> ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
> Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
> Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
> Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
> 
> E-Publishing, Python, Zope & Plone development, Consulting
>
>


-- 

Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida
___
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] Problem using nested dtml-in with zsql

2008-11-07 Thread Andreas Jung

Any particular reason for using DTML instead of ZPT? DTML is dead.

-aj

On 06.11.2008 20:53 Uhr, Miguel Beltran R. wrote:

Hi list

After read http://plope.com/Books/2_7Edition/AppendixA.stx#2-19 I tried
use two dtml-in for get information from zsql diferents, but say "This
resource may be trying to reference a nonexistent object or variable
*'x_var_region'*."

what is missing?

The first dtml-in (prefix="q") only return one record.
The second dtml-in return 12 records.

[code]






REGION


selected
 >









--

Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida




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



--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK

E-Publishing, Python, Zope & Plone development, Consulting

begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[EMAIL PROTECTED]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

___
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] Problem using nested dtml-in with zsql

2008-11-07 Thread Miguel Beltran R.
I found a litle solution using  (1)

but why not work using ?

(1) http://marc.info/?l=zope-dev&m=103341051405194&w=2



2008/11/6 Miguel Beltran R. <[EMAIL PROTECTED]>

> Hi list
>
> After read http://plope.com/Books/2_7Edition/AppendixA.stx#2-19 I tried
> use two dtml-in for get information from zsql diferents, but say "This
> resource may be trying to reference a nonexistent object or variable *
> 'x_var_region'*."
>
> what is missing?
>
> The first dtml-in (prefix="q") only return one record.
> The second dtml-in return 12 records.
>
> [code]
>  prefix="q">
> 
>  name="main_form">
> 
>
> 
> REGION
>
>   
>   access tha variable
>expr="x_var_region==q_var_region">selected
>  >
>  
>   
>
> 
> 
>
> 
> 
> 
> --
> 
> Lo bueno de vivir un dia mas
> es saber que nos queda un dia menos de vida
>



-- 

Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida
___
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] problem attach file / Zfile - more informations

2008-05-02 Thread Jonathan


- Original Message - 
From: "Frederique Blondelle" <[EMAIL PROTECTED]>

To: 
Sent: Friday, May 02, 2008 6:16 AM
Subject: [Zope] problem attach file / Zfile - more informations



Hello,

I have created a zclass with zfile as basic class.
With this class, users could, via a web form, send an attached file if
they want.
With zope 2.5 (my previous version) if users don't attach a file, there
is no problem
with zope 2.10, if there is no file attached, I have an error message :
'file not specified". It seems that  attach  file is mandatory.

Here, the complete message from the events log :

Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module OFS.DTMLMethod, line 144, in __call__
   - 
   - URL: http://assistance.abes.fr/do_add/manage_main
   - Physical Path: /assistance/do_add
  Module DocumentTemplate.DT_String, line 476, in __call__
  Module DocumentTemplate.DT_With, line 76, in render
  Module DocumentTemplate.DT_Util, line 196, in eval
   - __traceback_info__: _
  Module , line 1, in 
  Module OFS.DTMLMethod, line 137, in __call__
   - 
   - URL: http://assistance.abes.fr/Quest_susvp_add/manage_main
   - Physical Path: /assistance/Quest_susvp_add
  Module DocumentTemplate.DT_String, line 476, in __call__
  Module DocumentTemplate.DT_With, line 61, in render
  Module DocumentTemplate.DT_Util, line 196, in eval
   - __traceback_info__: REQUEST
  Module , line 1, in 
  Module ZClasses.ZClass, line 454, in createInObjectManager
  Module ZClasses.ZClass, line 485, in fromRequest
  Module ZPublisher.mapply, line 89, in mapply
  Module OFS.Image, line 120, in __init__
  Module OFS.Image, line 501, in _read_data
ValueError: File not specified


I don't know if this is the cause of your problem, but as of Zope 2.10 
ZClasses are deprecated.



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 )


Re: [Zope] Problem with DTML and JOINS(ZSQL)

2008-04-15 Thread Peter Bengtsson
Zope is agnostic of whatever SQL you enter. In other words, they
compile differently and their errors are completely different.
I suggest you do this:

1. Fake the ZSQL to make sure your DTML is correct by changing the SQL
to something like this:
  SELECT 'drug_name_test', 'route_of_admin_test', etc.

2. Then write the ZSQL properly with the correct SQL syntax that you
want to use and as you're developing this, test it using the ZSQL
Method's Test tab rather than testing it via your custom DTML
application.

3. Run together.


PS. Tip: I always name my ZSQL methods something like
select_all_drug_zsql or UpdateOneDrug.sql just to avoid confusion when
I'm later working on the application. 'drug' isn't a suitable name of
a function/method.

On 15/04/2008, member madhangc <[EMAIL PROTECTED]> wrote:
> Dear all, I am developing a web application for a biological research
> institute down here in india. I have some
> problem in using JOINS. The below is the queries i used,
>
> SQL query
>
> File name : drug
>  select drug_name,dtype from bio_info_schema.drug order by dtype
>
> File name:drug_gene_details
> Note : i used both the sql queries seperately, but neither one worked.
>
> SELECT
> drug.drug_name,drug.route_of_admin,drug.dose_adult,drug.dose_child,drug.adverse_effects,drug_gene.gene_name
>  FROM drug,drug_gene
> WHERE drug.drug_name = drug_gene.drug_name and drug.drug_name= drug_name type=string>
>
> SELECT
> drug.drug_name,drug.route_of_admin,drug.dose_adult,drug.dose_child,drug.adverse_effects,drug.dtype,drug_gene.gene_name
>  FROM drug INNER JOIN drug_gene
> ON drug.drug_name = drug_gene.drug_name AND drug.drug_name= drug_name type=string>
>
> Below is the DTML code i have used,
>
> File name : view_drug_detail
> 
>  
>  
>  Drug Name
>  
>  
>  
>  
>  
>  
>   href="http://localhost:8080/ddrd/ddrtb/drugs/display_drugs/drug_gene_details/drug_name/ drug_name>/view_drug_info">
>  
>  
>  
>
> File name : view_drug_info
>  Drug Information
> Summary
>  
> 
>  Drug name
>  
> 
>  Route of Administration route_of_admin>
>  
> 
>  Dosage (Adult)
>  
> 
>  Dosage (Child)
>  
> 
>  Adverse Effects
>  
> 
>  Drug Type
>  
> 
>  Drug Targets
>  
> 
>
> This is the error which i got.
>
> Site Error
>
>  An error was encountered while publishing this resource.
> exceptions.KeyError
>  Sorry, a site error occurred.
> Traceback (innermost last):
>  * Module ZPublisher.Publish, line 150, in publish_module
> * Module ZPublisher.Publish, line 114, in publish
>  * Module Zope, line 134, in zpublisher_exception_hook
> * Module Shared.DC.ZRDB.DA, line 547, in __getattr__
>  KeyError: _r
> Troubleshooting Suggestions
>  * The URL may be incorrect.
> * The parameters passed to this resource may be incorrect.
>  * A resource that this resource relies on may be encountering an error.
>  For more detailed information about the error, please refer to the HTML
> source for this page.
>  If the error persists please contact the site maintainer. Thank you for
> your patience.
>
> Any kind of suggestion and help will be very useful. Thanks in advance.
>
> --
> Best Regards
> \madhan
>
> Things must be learned only to be unlearned again or, more likely, to be
> corrected.
>  -- Richard Feynman
> ___
>  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 )
>
>


-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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] Problem with DTML and JOINS(ZSQL)

2008-04-15 Thread Jaroslav Lukesh
Did you try the Test tab at ZSQL method management page? If it does not 
work, you will get error from SQL server. If it works and you does not get 
any data, then your query is not fit to any data.


- Original Message - 
From: member madhangc

To: zope@zope.org
Sent: Tuesday, April 15, 2008 1:08 PM
Subject: [Zope] Problem with DTML and JOINS(ZSQL)


Dear all, I am developing a web application for a biological research 
institute down here in india. I have some

problem in using JOINS. The below is the queries i used,

SQL query

File name : drug
select drug_name,dtype from bio_info_schema.drug order by dtype

File name:drug_gene_details
Note : i used both the sql queries seperately, but neither one worked.

SELECT 
drug.drug_name,drug.route_of_admin,drug.dose_adult,drug.dose_child,drug.adverse_effects,drug_gene.gene_name

FROM drug,drug_gene
WHERE drug.drug_name = drug_gene.drug_name and drug.drug_name=drug_name type=string>


SELECT 
drug.drug_name,drug.route_of_admin,drug.dose_adult,drug.dose_child,drug.adverse_effects,drug.dtype,drug_gene.gene_name

FROM drug INNER JOIN drug_gene
ON drug.drug_name = drug_gene.drug_name AND drug.drug_name=drug_name type=string>



___
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] Problem with zopectl debug

2008-04-10 Thread Manuel Vazquez Acosta
Dieter Maurer wrote:
> Manuel Vazquez Acosta wrote at 2008-4-7 15:21 -0400:
>> Dieter Maurer wrote:
>>> That is very strange:
>>>
>>>   "zopectl debug" uses almost exactly the same startup sequence
>>>   as "zopectl fg" (at least until after the configuration).
>>>   Thus, if your Zope starts at all, "zopectl debug" should start.
>> ...
>> zopectl fg starts. Would need to see the starting sequence?
> 
> Really funny
> 
> Unfortunately, this means that is will be quite difficult
> to find the cause of your problem.
> 
> One approach would be to emulate in a pure Python interpreter
> what "zopectl debug" would do for us.
> 
> You may try:
> 
> bin/zopectl shell # will create a new shell process with the correct 
> environment
> 
> from Zope2.Startup.run import configure
> configure('etc/zope.conf')
> # this is likely to raise the exception you have earlier reported
> from pdb import pm
> pm() # analyse the exception context
> 
> 
> 

I will try that. Any thing happens I report back to the list.

Best regards,
Manuel.
___
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] Problem with zopectl debug

2008-04-08 Thread Dieter Maurer
Manuel Vazquez Acosta wrote at 2008-4-7 15:21 -0400:
>Dieter Maurer wrote:
>> That is very strange:
>> 
>>   "zopectl debug" uses almost exactly the same startup sequence
>>   as "zopectl fg" (at least until after the configuration).
>>   Thus, if your Zope starts at all, "zopectl debug" should start.
> ...
>zopectl fg starts. Would need to see the starting sequence?

Really funny

Unfortunately, this means that is will be quite difficult
to find the cause of your problem.

One approach would be to emulate in a pure Python interpreter
what "zopectl debug" would do for us.

You may try:

bin/zopectl shell # will create a new shell process with the correct 
environment

from Zope2.Startup.run import configure
configure('etc/zope.conf')
# this is likely to raise the exception you have earlier reported
from pdb import pm
pm() # analyse the exception context



-- 
Dieter
___
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] Problem with zopectl debug

2008-04-07 Thread Manuel Vazquez Acosta
Dieter Maurer wrote:
> That is very strange:
> 
>   "zopectl debug" uses almost exactly the same startup sequence
>   as "zopectl fg" (at least until after the configuration).
>   Thus, if your Zope starts at all, "zopectl debug" should start.
> 
> Are you sure that the CMF version fits to your Zope version?
> 

Dear Mr. Maurer,

Thanks for your response. Here are more details.

CMF is the one that came with Plone 2.5 (I'm planning to upgrade to 2.5.5).

Zope is 2.9.8-final.

zopectl fg starts. Would need to see the starting sequence?

Best regards,
Manuel.

___
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] Problem with zopectl debug

2008-04-06 Thread Dieter Maurer
Manuel Vazquez Acosta wrote at 2008-4-5 22:23 -0400:
> ...
>I'm trying to debug a Plone site with zopectl debug. I'm getting this error:
>
>Traceback (most recent call last):
> ...
>from Products.CMFCore.DirectoryView import registerDirectory
>  File "/usr/lib/python2.4/site-packages/PIL/__init__.py", line 20, in ?
>
>  File "/var/zope/zope-prensa/Products/CMFCore/PortalObject.py", line
>18, in ?
>ImportError: cannot import name InitializeClass

That is very strange:

  "zopectl debug" uses almost exactly the same startup sequence
  as "zopectl fg" (at least until after the configuration).
  Thus, if your Zope starts at all, "zopectl debug" should start.

Are you sure that the CMF version fits to your Zope version?



-- 
Dieter
___
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] Problem with WebDAV and non-ascii titles

2008-03-31 Thread Dieter Maurer
Pawel Lewicki wrote at 2008-3-28 15:52 +0100:
>I have a problem with accessing files with non-ascii titles via Enfold 
>Desktop (WebDAV)- Zope 2.10.4).
>
>Traceback (innermost last):
>   Module ZPublisher.Publish, line 119, in publish
>   Module ZPublisher.mapply, line 88, in mapply
>   Module ZPublisher.Publish, line 42, in call_object
>   Module webdav.Resource, line 286, in PROPFIND
>   Module webdav.davcmds, line 124, in apply
>   Module OFS.PropertySheets, line 344, in dav__allprop
>UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 47: 
>ordinal not in range(128)

WebDAV is XML technology, therefore essentially unicode.

Apparently, your "title"s are plain strings. Therefore,
Python needs to convert them to unicode at the WebDAV boundary.
Obviously, an encoding is necessary to do this -- and
as no explicit encoding is given, Python's defaultencoding
is used (which defaults to "ascii").


The most proper solution would be to make your "title"s unicode.

If all your plain strings use a common encoding, then
you can set Python's defaultencoding to this encoding.
You must do that at startup (e.g. in "sitecustomize.py"),
as "setdefaultencoding" is removed from "sys" after startup.



-- 
Dieter
___
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] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8

2008-03-27 Thread Yuri

Dieter Maurer wrote:

Yuri wrote at 2008-3-26 11:19 +0100:
  

I've got a trouble importing a ZClass app to 2.9.8 from 2.6.1.

First, I've tried 2.8, and it worked but had the __new__ problem, so 
I've seen it is fixed in 2.9.8.


After the upgrade, all seemed to work. My ZClass is a container (with 
ExtFile). I've been able to create a new instance, then had trouble 
after uploading an ExtFile. The file is there, in the repository, but 
when I clicked over it, I get a fast scrolling in the log. After the 
restart, the ZClass instances and the Product in the control panel, 
gived me a maximun recursion depth, here the last part:


 File "/usr/lib/zope2.9.8/lib/python/ZODB/serialize.py", line 597, in 
getState

   return unpickler.load()

 File "logging/__init__.py", line 1078, in _log
 File "logging/__init__.py", line 1064, in makeRecord
 File "logging/__init__.py", line 226, in __init__
   # Must happen after ZopeStarter.setupInitialLogging()
RuntimeError: maximum recursion depth exceeded in cmp



This is very strange: the traceback you show does not seem very deep.
It should not raise a "maximum recursion depth exceeded".
  



I deleted the long first part, always equal to the last one. Does it 
matter? :)



As always: when you see something which should not be there, debugging
may be necessary for understanding...
  


I agree. But it works, until you restart then this error happen forever.

How can I debug this?

___
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] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8

2008-03-26 Thread Dieter Maurer
Yuri wrote at 2008-3-26 11:19 +0100:
> I've got a trouble importing a ZClass app to 2.9.8 from 2.6.1.
>
> First, I've tried 2.8, and it worked but had the __new__ problem, so 
>I've seen it is fixed in 2.9.8.
>
> After the upgrade, all seemed to work. My ZClass is a container (with 
>ExtFile). I've been able to create a new instance, then had trouble 
>after uploading an ExtFile. The file is there, in the repository, but 
>when I clicked over it, I get a fast scrolling in the log. After the 
>restart, the ZClass instances and the Product in the control panel, 
>gived me a maximun recursion depth, here the last part:
>
>  File "/usr/lib/zope2.9.8/lib/python/ZODB/serialize.py", line 597, in 
>getState
>return unpickler.load()
> 
>  File "logging/__init__.py", line 1078, in _log
>  File "logging/__init__.py", line 1064, in makeRecord
>  File "logging/__init__.py", line 226, in __init__
># Must happen after ZopeStarter.setupInitialLogging()
>RuntimeError: maximum recursion depth exceeded in cmp

This is very strange: the traceback you show does not seem very deep.
It should not raise a "maximum recursion depth exceeded".

As always: when you see something which should not be there, debugging
may be necessary for understanding...



-- 
Dieter
___
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] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8

2008-03-26 Thread Yuri

Yuri wrote:


On Mar 26, 2008, at 11:19 , Yuri wrote:

> Hi!
>
> I've got a trouble importing a ZClass app to 2.9.8 from 2.6.1.



IMHO you're not investing your time wisely trying to make a ZClas  
application work on a later Zope version. They're unsupported and  
dead. I would keep the old setup running and spend time on 
recreating  the ZClass product functionality as a real Zope product, 
and then  create a script to migrate the old ZClass instances over.
  


Sure, but then I would switch totally to zope3 techs, at least.


I've solved using zope 2.7.9.

The application was running in an old sparc64, and it was urgent to 
move it from this unsupported hardware.


Noew I can think to make products, eggs and so on :)
___
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] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8

2008-03-26 Thread Jens Vagelpohl


On Mar 26, 2008, at 16:19 , Yuri wrote:


On Mar 26, 2008, at 11:19 , Yuri wrote:

> Hi!
>
> I've got a trouble importing a ZClass app to 2.9.8 from 2.6.1.


IMHO you're not investing your time wisely trying to make a ZClas   
application work on a later Zope version. They're unsupported and   
dead. I would keep the old setup running and spend time on  
recreating  the ZClass product functionality as a real Zope  
product, and then  create a script to migrate the old ZClass  
instances over.


Sure, but then I would switch totally to zope3 techs, at least.


Where you move from ZClasses is entirely up to you, of course.


The point is, why a working envinroment in zope, don't works anymore  
just restarting zope?


It seems a database corruption or something not written in the disk,  
so it is worth an investigation.


All works, you restart, boom. Can't recover in any way.

At least there's should not mentioned any fix in 2.9.8, if it does  
not works. It is time comsuming for nothing, and kills any love with  
Zope, imho.


What you're seeing is probably unrelated to whatever "fix" there is in  
Zope 2.9.8. Even if you could prove that this is a new (or old  
unfixed) bug you will probably have a hard time finding anyone fixing  
it, because it's a bug in dead technology that no one wants to support  
anymore.


jens


___
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] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8

2008-03-26 Thread Yuri


On Mar 26, 2008, at 11:19 , Yuri wrote:

> Hi!
>
> I've got a trouble importing a ZClass app to 2.9.8 from 2.6.1.



IMHO you're not investing your time wisely trying to make a ZClas  
application work on a later Zope version. They're unsupported and  
dead. I would keep the old setup running and spend time on recreating  
the ZClass product functionality as a real Zope product, and then  
create a script to migrate the old ZClass instances over.
  


Sure, but then I would switch totally to zope3 techs, at least.

The point is, why a working envinroment in zope, don't works anymore 
just restarting zope?


It seems a database corruption or something not written in the disk, so 
it is worth an investigation.


All works, you restart, boom. Can't recover in any way.

At least there's should not mentioned any fix in 2.9.8, if it does not 
works. It is time comsuming for nothing, and kills any love with Zope, imho.


Say: in this version this and this works, in that version not. Say "it 
works", then it don't, who knows



jens


___
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] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8

2008-03-26 Thread Allen Schmidt Sr.

Thanks for the info.
Our Data.fs hovers in the 7-8 gig range and we have been running with 
Zope for 8 years. And the news parts are just a fraction of our content 
and a newspaper website with many different vertical products and 
sections. I would say that makes us married to Zope2! ;)


I appreciate the responses and info. I have been contacted offlist by 
someone who is offering assistance. We'll see where that goes.


Thanks again.

Allen


Andreas Jung wrote:




--On 26. März 2008 09:48:11 -0400 "Allen Schmidt Sr." 
<[EMAIL PROTECTED]> wrote:



No idea even where to start. I played with creating a 'boring' object a
while back but I am pretty sure ours is a tad more complicated. All the
parts of our site I work on are in SQL and was never involved in the
ZClass News stuff. It just works...and continues to work...but is
limiting us from upgrading.

So, where to start. Once we get some guidance, we could probably do it
ourselves.  Anyone willing to a$$$ist? We don't have a budget for it but
could scrape something together to get started. Even just to log in and
look at what we have and say,
"Ah, you need to do this and this and this, then it will work."
I know not that simple, but that is what I am trying to find out.




We know basically nothing about your application and needs..so we can 
basically give only highlevel advices. If you can: go with Grok if you 
can divorce from the Zope 2 world. Representing your entities like news 
items using a simple schema based implementation is not a big deal. 
Group news items and other content objects in containers is also 
straight forward...but no idea but further business logic and further 
requirements. So if you aren't married with Zope 2 and when you have the 
chance making a cut, go with Grok...but it might require a close 
analysis of your current system.


Andre
as

___
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] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8

2008-03-26 Thread Andreas Jung



--On 26. März 2008 09:48:11 -0400 "Allen Schmidt Sr." 
<[EMAIL PROTECTED]> wrote:



No idea even where to start. I played with creating a 'boring' object a
while back but I am pretty sure ours is a tad more complicated. All the
parts of our site I work on are in SQL and was never involved in the
ZClass News stuff. It just works...and continues to work...but is
limiting us from upgrading.

So, where to start. Once we get some guidance, we could probably do it
ourselves.  Anyone willing to a$$$ist? We don't have a budget for it but
could scrape something together to get started. Even just to log in and
look at what we have and say,
"Ah, you need to do this and this and this, then it will work."
I know not that simple, but that is what I am trying to find out.




We know basically nothing about your application and needs..so we can 
basically give only highlevel advices. If you can: go with Grok if you can 
divorce from the Zope 2 world. Representing your entities like news items 
using a simple schema based implementation is not a big deal. Group news 
items and other content objects in containers is also straight 
forward...but no idea but further business logic and further requirements. 
So if you aren't married with Zope 2 and when you have the chance making a 
cut, go with Grok...but it might require a close analysis of your current 
system.


Andreas

pgprQVC8jflGs.pgp
Description: 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 )


Re: [Zope] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8

2008-03-26 Thread Allen Schmidt Sr.
No idea even where to start. I played with creating a 'boring' object a 
while back but I am pretty sure ours is a tad more complicated. All the 
parts of our site I work on are in SQL and was never involved in the 
ZClass News stuff. It just works...and continues to work...but is 
limiting us from upgrading.


So, where to start. Once we get some guidance, we could probably do it 
ourselves.  Anyone willing to a$$$ist? We don't have a budget for it but 
could scrape something together to get started. Even just to log in and 
look at what we have and say,

"Ah, you need to do this and this and this, then it will work."
I know not that simple, but that is what I am trying to find out.

Thanks

Allen


Jens Vagelpohl wrote:



On Mar 26, 2008, at 12:59 , Allen Schmidt Sr. wrote:

That sounds so easy. We have one ZClass but it is the basis of  almost 
our entire newspaper website. The news ZClass was built in  2000 and 
put into production when we went live on Zope in Feb 2001  (just 
before the guys at Zope Corp said that ZClasss were bad). Over  7 full 
years of daily news as ZClass objects. We are in the same  boat as we 
want to move from 2.7.5 to a later version. We could  switch to SQL 
articles but then we would have to make sure all the  old URLs still 
functioned as our content is all over the search  engines...and 
convert everywhere there are tools to manage story  creation, 
importing, editing, etc. Yuck. We could just make the  cutover one day 
and just keep an instance running for the old stuff  and all new stuff 
runs from SQL.



When you build a "real" Zope product to replace the ZClasses it is no  
problem to make it behave like the old instances and put them in the  
same place as the old instance so the URL remains the same. Switching  
away from ZClasses does not mean you must change instance URLs etc.


jens


___
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] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8

2008-03-26 Thread Jens Vagelpohl


On Mar 26, 2008, at 12:59 , Allen Schmidt Sr. wrote:
That sounds so easy. We have one ZClass but it is the basis of  
almost our entire newspaper website. The news ZClass was built in  
2000 and put into production when we went live on Zope in Feb 2001  
(just before the guys at Zope Corp said that ZClasss were bad). Over  
7 full years of daily news as ZClass objects. We are in the same  
boat as we want to move from 2.7.5 to a later version. We could  
switch to SQL articles but then we would have to make sure all the  
old URLs still functioned as our content is all over the search  
engines...and convert everywhere there are tools to manage story  
creation, importing, editing, etc. Yuck. We could just make the  
cutover one day and just keep an instance running for the old stuff  
and all new stuff runs from SQL.


When you build a "real" Zope product to replace the ZClasses it is no  
problem to make it behave like the old instances and put them in the  
same place as the old instance so the URL remains the same. Switching  
away from ZClasses does not mean you must change instance URLs etc.


jens



___
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] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8

2008-03-26 Thread Jonathan


- Original Message - 
From: "Allen Schmidt Sr." <[EMAIL PROTECTED]>

To: "Jens Vagelpohl" <[EMAIL PROTECTED]>
Cc: "zope user list" 
Sent: Wednesday, March 26, 2008 7:59 AM
Subject: Re: [Zope] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8


That sounds so easy. We have one ZClass but it is the basis of almost our 
entire newspaper website. The news ZClass was built in 2000 and put into 
production when we went live on Zope in Feb 2001 (just before the guys at 
Zope Corp said that ZClasss were bad). Over 7 full years of daily news as 
ZClass objects. We are in the same boat as we want to move from 2.7.5 to a 
later version. We could switch to SQL articles but then we would have to 
make sure all the old URLs still functioned as our content is all over the 
search engines...and convert everywhere there are tools to manage story 
creation, importing, editing, etc. Yuck. We could just make the cutover 
one day and just keep an instance running for the old stuff and all new 
stuff runs from SQL.


We did a similar conversion product, but instead of switching to SQL we just 
build new python-based class instance objects, so that all existing urls 
would continue to work.  We built the new class instances in a separate 
folder, keeping the same ids as the original zclass instances, and then just 
swapped the folders around.  We are using zcatalogs, so we also had to 
rebuild these.


We had to manually create a very simple zope product to define the new 
classes, but this is a very easy/simple process.  We then used a combination 
of python scripts and external methods to loop thru the zclass instances, 
create new python-based class instances and update the new zcatalogs (we had 
5 different sets of data each with its own zcatalog).


All-in-all it was a bit of a pita, but the ability to upgrade to newer zope 
versions without fear was well worth the time and effort.


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 )


Re: [Zope] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8

2008-03-26 Thread Andreas Jung



--On 26. März 2008 07:59:20 -0400 "Allen Schmidt Sr." 
<[EMAIL PROTECTED]> wrote:



That sounds so easy. We have one ZClass but it is the basis of almost our
entire newspaper website. The news ZClass was built in 2000 and put into
production when we went live on Zope in Feb 2001 (just before the guys at
Zope Corp said that ZClasss were bad).


I think it wasn't ZC. The community just does not give the love to ZClasses
one would expect. Consider ZClasses as a second or third-class citizen 
within the Zope world.




Over 7 full years of daily news as
ZClass objects. We are in the same boat as we want to move from 2.7.5 to
a later version. We could switch to SQL articles but then we would have
to make sure all the old URLs still functioned as our content is all over
the search engines...and convert everywhere there are tools to manage
story creation, importing, editing, etc. Yuck. We could just make the
cutover one day and just keep an instance running for the old stuff and
all new stuff runs from SQL.


8 years of lifetime is pretty long..I think at this point it would be time
for switching to some new architecture. You have plenty of great
Zope technology available right now in order to make the change...of course
this requires time and money :-)

Andreas

pgpQVQDaArWMH.pgp
Description: 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 )


Re: [Zope] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8

2008-03-26 Thread Allen Schmidt Sr.
That sounds so easy. We have one ZClass but it is the basis of almost 
our entire newspaper website. The news ZClass was built in 2000 and put 
into production when we went live on Zope in Feb 2001 (just before the 
guys at Zope Corp said that ZClasss were bad). Over 7 full years of 
daily news as ZClass objects. We are in the same boat as we want to move 
from 2.7.5 to a later version. We could switch to SQL articles but then 
we would have to make sure all the old URLs still functioned as our 
content is all over the search engines...and convert everywhere there 
are tools to manage story creation, importing, editing, etc. Yuck. We 
could just make the cutover one day and just keep an instance running 
for the old stuff and all new stuff runs from SQL.


Has anyone every built tools to inspect a ZClass and produce a python 
product on the other end? That would be slick...but probably not worth 
the effort if only a few still use them.


Allen




Jens Vagelpohl wrote:


On Mar 26, 2008, at 11:19 , Yuri wrote:


Hi!

I've got a trouble importing a ZClass app to 2.9.8 from 2.6.1.



IMHO you're not investing your time wisely trying to make a ZClas  
application work on a later Zope version. They're unsupported and  dead. 
I would keep the old setup running and spend time on recreating  the 
ZClass product functionality as a real Zope product, and then  create a 
script to migrate the old ZClass instances over.


jens



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


Re: [Zope] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8

2008-03-26 Thread Jens Vagelpohl


On Mar 26, 2008, at 11:19 , Yuri wrote:

Hi!

I've got a trouble importing a ZClass app to 2.9.8 from 2.6.1.


IMHO you're not investing your time wisely trying to make a ZClas  
application work on a later Zope version. They're unsupported and  
dead. I would keep the old setup running and spend time on recreating  
the ZClass product functionality as a real Zope product, and then  
create a script to migrate the old ZClass instances over.


jens



___
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] problem authenticating, even with emergency user

2008-01-30 Thread Ben Bartrum
> -Original Message-
> From: [EMAIL PROTECTED]
> Sent: Wed, 30 Jan 2008 19:29:05 +0100
> 
> This is too late.
> 
> The dynamic loader looks at "LD_LIBRARY_PATH" on startup
> and then caches the value. Later modification have no effect
> on the current process.
> 
> You need to set "LD_LIBRARY_PATH" before you start Zope.

Thank you Dieter, I think you are right, and I am going to add the 
LD_LIBRARY_PATH to zopectl
___
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 )


  1   2   3   4   >