[Zope] ImportError: cannot import name base_hasattr

2007-02-27 Thread tonylabarbara
Hi: This really should go to the Plone list, but seeing as how I can't hit their site from either of my browsers, how can I subscribe to the list? I couldn't download Plone, either, so I just built it from tarballs from an earlier installation, tarballing all the products associated with it

[Zope] Re: ImportError: cannot import name base_hasattr

2007-02-28 Thread tonylabarbara
Maciej Wisniowski recently responded something to the effect of that I should take a look at my PYTHONPATH and gave me the address for subscribing to Plone. Thank you. I subscribed and posted to Plone, but after a day have received no response :( I looked at my PYTHONPATH, as per your

[Zope] Re: ImportError: cannot import name base_hasattr

2007-03-03 Thread tonylabarbara
Maciej Wisniowski wrote: Take a look at pathes in your traceback: /usr/local/www/zope/278/lib/python /usr/local/zope/278/lib/python /usr/local/zope/instance1/Products Why there are two different(!) lib/python/ folders? I see the problem! And I know what caused it. So I rebuilt Zope from source

[Zope] Resizing Images In Page Templates

2007-03-04 Thread tonylabarbara
Hi; I saw somewhere someone adding code like this: img src=myimage.jpg/resize / that would automatically resize his image according to a predetermined standard. Does anyone know how this or something similar is done? TIA, Tony

Re: [Zope] Resizing Images In Page Templates

2007-03-04 Thread tonylabarbara
Hmm. I have it working on the server from which I am moving to another server. I didn't build the code. But it sure does work just fine. Sorry. Not nonsense. Anyone else have any ideas? TIA, Tony -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; zope@zope.org Sent:

Re: [Zope] Resizing Images In Page Templates

2007-03-04 Thread tonylabarbara
ImageTag_Hotfix. Got it! Thanks! Tony -Original Message- From: [EMAIL PROTECTED] To: zope@zope.org Sent: Sun, 4 Mar 2007 4:41 PM Subject: Re: [Zope] Resizing Images In Page Templates (Sun, Mar 04, 2007 at 09:20:06AM -0500) [EMAIL PROTECTED] wrote/schrieb/egrapse: Hmm. I have it

[Zope] Pounding Python Eggs

2007-03-05 Thread tonylabarbara
Hi; I'm trying to install ZMySQLDA on a new server I'm building. I got this error: Traceback (most recent call last): File /usr/local/zope/278/lib/python/Zope/Startup/run.py, line 50, in ? run() File /usr/local/zope/278/lib/python/Zope/Startup/run.py, line 19, in run

[Zope] ZMySQLDA Problem

2007-03-05 Thread tonylabarbara
Traceback (most recent call last): File /usr/local/zope/278/lib/python/OFS/Application.py, line 673, in import_product product=__import__(pname, global_dict, global_dict, silly) File /usr/local/zope/instance1/Products/ZMySQLDA/__init__.py, line 91, in ? import DA File

Re: [Zope] ZMySQLDA Problem

2007-03-05 Thread tonylabarbara
# find / -name libmysqlclient_r.so.15 /usr/local/lib/mysql/libmysqlclient_r.so.15 # find / -name bdist.freebsd-6.2-RELEASE-i386 /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386 # ls /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386/ # It would appear that indeed

Re: [Zope] ZMySQLDA Problem

2007-03-05 Thread tonylabarbara
Thank you for giving me that command, unfortunately, export is not found on my system (?). # export LD_LIBRARY_PATH=/usr/local/lib/mysql/ export: Command not found. # find / -name export # Is there another command? FreeBSD 6.2 TIA, Tony -Original Message- From: [EMAIL PROTECTED]

Re: [Zope] ZMySQLDA Problem

2007-03-05 Thread tonylabarbara
setenv Thanks! Tony -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; zope@zope.org Sent: Mon, 5 Mar 2007 8:38 AM Subject: Re: [Zope] ZMySQLDA Problem --On 5. März 2007 07:35:19 -0500 [EMAIL PROTECTED] wrote: Thank you for giving me that command, unfortunately,

[Zope] Problem On Rebuild

2007-03-05 Thread tonylabarbara
Hi; I'm building out a new server and trying to import all the functionality from the old OS-corrupted server. The Web site built on this server have a directory structure that's easy for identifying stuff but makes for long URLS: example.com/dir1/dir2/dir3/dir4/index.pt They're always the

Re: [Zope] Problem On Rebuild

2007-03-05 Thread tonylabarbara
-Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; zope@zope.org Sent: Mon, 5 Mar 2007 1:36 PM Subject: Re: [Zope] Problem On Rebuild You're running Zope with a different Python version/binary than the one used to compile and install Zope. Trible check that. I will;

Re: [Zope] Problem On Rebuild

2007-03-05 Thread tonylabarbara
-Original Message- From: [EMAIL PROTECTED] To: zope@zope.org; [EMAIL PROTECTED] Sent: Mon, 5 Mar 2007 2:19 PM Subject: Re: [Zope] Problem On Rebuild I missed the beginning of this thread so i don't know if i missed something relevant, but url rewriting in general is often done within

[Zope] Calling a Variable

2007-03-08 Thread tonylabarbara
Hi; I thought I could call a variable in a page template by defining it and then putting a ? in front of it in a URL, like this: html tal:define=global base_url here/baseURL; template_id string:index; here python:here.restrictedTraverse('s/c/x/root/en-us/Help') a href=?base_url/contactus.pt

Re: [Zope] Calling a Variable

2007-03-08 Thread tonylabarbara
Thanks for clarifying that! Tony -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: zope@zope.org Sent: Thu, 8 Mar 2007 2:14 PM Subject: Re: [Zope] Calling a Variable On 3/8/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I thought I could call a variable in a page

[Zope] Iteration Over Non-sequence

2007-03-08 Thread tonylabarbara
Hi; I've written this code: html body span tal:define=global number here/quotes/randomNumber/span tabletrtd span metal:use-macro=here/en-us/quotes/?number/macros/quote/spanbr / /td/tr/table /body html ...and here's randomNumber, which is an External Method: def randomNumber(self): return

[Zope] No space left on device

2007-03-09 Thread tonylabarbara
Hi; I'm moving everything over to a new server because the old server's OS is corrupt. I've d'l'd a 300MB *.zexp file from the old server. (I have to d'l it to my PC over a slow satellite connection, then upload it to the new server because of the corruption.) When I went to install it, I got

Re: [Zope] No space left on device

2007-03-09 Thread tonylabarbara
-Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; zope@zope.org Sent: Fri, 9 Mar 2007 4:49 AM Subject: Re: [Zope] No space left on device --On 9. März 2007 03:45:05 -0500 [EMAIL PROTECTED] wrote: Hi; I'm moving everything over to a new server because the old

Re: [Zope] No space left on device

2007-03-09 Thread tonylabarbara
Right, restarted. But it didn't work, Tino. Any ideas? -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: zope@zope.org Sent: Fri, 9 Mar 2007 6:28 AM Subject: Re: [Zope] No space left on device Maciej Wisniowski schrieb: Where? I added this line to zopectl and

[Zope] Data.fs MySQL DB Blown Up!

2007-03-12 Thread tonylabarbara
Hi; Forgive the long (but necessary) background. I bought a new 500 GB hard drive for my server located on the other side of the world. I accidentally entered an erroneous command to copy everything from the old HD to the new one and ended up corrupting the OS. However, the *first* thing that

[Zope] Redirecting

2007-03-12 Thread tonylabarbara
Hi; I have a Web site I'm building a shopping cart for that is built with a basic site template and an iframe where all the page-by-page info goes. I need to redirect the iframe to the address below, but when I use the current incantation, it replaces not just the iframe but the whole page! Can

Re: [Zope] Redirecting

2007-03-12 Thread tonylabarbara
Ugh. JS redirects create problems with the search engines. What I really want to do is fill the hole in the doughnut, to use a radio advertising term. That is, I have code before the page data referenced below, and I have code after it. I want to write the stuff referenced below into the hole.

[Zope] 'int' object has no attribute 'objectValues'

2007-03-12 Thread tonylabarbara
Hi; I've written this PT: span tal:define=batch here/quotes/objectValues; num python:len(batch) p tal:replace=python:here.randomNumber(num) / /span ...which calls this external method: import random def randomNumber(num): return random.random(num) ...and throws this error: Error Type:

[Zope] 'int' object has no attribute 'objectValues'

2007-03-13 Thread tonylabarbara
When I rewrite the command to tal:replace batch and surf to it, it displays the object values of every object in the quotes folder. That's what inspired me to measure the len. So, batch is not a number, but num is, and I've proven this by having the scriptlet print out that number. AJ says I

[Zope] Cannot Import Base has_attr...Again!

2007-03-17 Thread tonylabarbara
Hi; I had this problem on another server I recently built...and it went away all by itself! I'm now rebuilding my home server, and it's cropped up again. Last time, Maciej Wisniowski suggested I go to a zopectl prompt and type in import Products.CMFPlone, but apparently that doesn't work on

[Zope] Cannot Import Base has_attr...Again!

2007-03-17 Thread tonylabarbara
Hi; I had this problem on another server I recently built...and it went away all by itself! I'm now rebuilding my home server, and it's cropped up again. Last time, Maciej Wisniowski suggested I go to a zopectl prompt and type in import Products.CMFPlone, but apparently that doesn't work on

[Zope] Cannot Import Base has_attr...Again!

2007-03-17 Thread tonylabarbara
Hi; I had this problem on another server I recently built...and it went away all by itself! I'm now rebuilding my home server, and it's cropped up again. Last time, Maciej Wisniowski suggested I go to a zopectl prompt and type in import Products.CMFPlone, but apparently that doesn't work on

Re: [Zope] Cannot Import Base has_attr...Again!

2007-03-18 Thread tonylabarbara
You might not believe this, but sometimes software goes haywire. Before you jump down my throat, realize that unavoidable accidents sometimes do happen. And this is the only time it's happened with me on this list, thank you very much. Tony -Original Message- From: [EMAIL PROTECTED]

Re: [Zope] Cannot Import Base has_attr...Again!

2007-03-18 Thread tonylabarbara
I did that last time and no one addressed the issue, so I came here. Would you care to address the issue? Tony -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; zope@zope.org Sent: Sat, 17 Mar 2007 3:21 PM Subject: Re: [Zope] Cannot Import Base has_attr...Again!

[Zope] Problem w/ ZMySQLDA

2007-07-16 Thread tonylabarbara
- Original Message - From: tonylabarbara at aol.com To: zope at zope.org Sent: Saturday, July 14, 2007 5:43 PM Subject: [Zope] Problem w/ ZMySQLDA Hi; ? I just built out a new server and transfered my databases. I use Zope to server my web sites and ZMySQLDA to interface between

Re: [Zope] Problem w/ ZMySQLDA

2007-07-16 Thread tonylabarbara
/ ZMySQLDA? ? ? - Original Message - From: tonylabarbara at aol.com? To: zope at zope.org? Sent: Saturday, July 14, 2007 5:43 PM? Subject: [Zope] Problem w/ ZMySQLDA? ? ? Hi;? ? I just built out a new server and transfered my databases. I use Zope to? server my web sites

Re: [Zope] AttributeError: Can't Pin It Down!

2007-07-21 Thread tonylabarbara
Okay, I can give you an example from a PT. It will follow. However... 1) All of these sites were working just fine when I made backups of them, which backups I installed on my new server I built. 2) I didn't edit anything. I just built and un-zexp'd (imported) everything. So...wouldn't it seem

Re: [Zope] AttributeError: Can't Pin It Down!

2007-07-23 Thread tonylabarbara
-Original Message- From: Dieter Maurer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: zope@zope.org Sent: Sun, 22 Jul 2007 1:51 pm Subject: Re: [Zope] AttributeError: Can't Pin It Down! [EMAIL PROTECTED] wrote at 2007-7-21 14:27 -0400: ... Error Type: AttributeError Error Value:

[Zope] HELP! Will PAY YOU to Fix This Problem!

2007-07-23 Thread tonylabarbara
Hi; I just built out a new server according to a formulary I´ve worked before without any problems. Now, however, I have a bug in ALL of my Zope sites that throws a strange attribute error for various attributes that have always worked in the past (see thread AttributeError: Can´t Pin It

[Zope] Increment In PT?

2007-07-30 Thread tonylabarbara
Hi; I´m trying to increment a variable in a page template. Here´s the general idea in my code: div metal:define-macro=main tal:define=x python:0   tal:block tal:define=x python:x + 1 td input type=hidden tal:attributes=value item/name; name python:'item_name_' + `x` Now, all of that

Re: [Zope] Increment In PT?

2007-07-30 Thread tonylabarbara
In order to interact with the paypal shopping cart system, they want me to increment hidden fields, such as: input type=hidden tal:attributes=value item/name; name python:'item_name_' + `x` input type=hidden tal:attributes=value item/id; name python:'item_number_' + `x` where x is a number

Re: [Zope] Increment In PT?

2007-07-30 Thread tonylabarbara
Can you give me an example of how to use the enumerate method in a repeat? I've googled this with no luck. Here's my tal:repeat clause: ? span tal:repeat=bitem_id bitem_ids; tal:omit-tag= As fas as passing this to a python script, I'd rather not. That seems like too much trouble for

Re: [Zope] Increment In PT?

2007-07-30 Thread tonylabarbara
I would think this should be pretty easy in the PT itself, given what you've shared so far. But I'm still not quite there. Here's what I've got:   span tal:repeat=bitem_id bitem_ids tal:omit-tag=    div tal:define=iter python:modules['ZTUtils'].Iterator(range(1000))     br

Re: [Zope] Increment In PT?

2007-07-30 Thread tonylabarbara
Okay, I've got this line:    div tal:define=iter python:modules['ZTUtils'].Iterator(range(1000)); x iter/next and then use this kind of line several times further down and within the div:     input type=hidden tal:attributes=value bitem/quantity; name python:'quantity_' + `x`

Re: [Zope] Increment In PT?

2007-07-30 Thread tonylabarbara
It's complaining that: Error Type: TypeError Error Value: string indices must be integers I tried back ticks and that still gave the same error. TIA, Tony tal:loop repeat=item bitems     input type=hidden tal:attributes=value item/name; name string:item_name_${repeat/item/number}     input

Re: [Zope] Increment In PT?

2007-07-30 Thread tonylabarbara
This is the code that I have:   span tal:repeat=bitem_id bitem_ids tal:omit-tag=     span tal:define=bitem python:here.basketItemManager.getItem(bitem_id);   item python:here.marketItems.getItem(bitem.marketItemId)   tal:omit-tag= This is the code

Re: [Zope] Increment In PT?

2007-07-30 Thread tonylabarbara
Well, there I go making mountains out of molehills again. This worked just fine:     span tal:define=bitem python:here.basketItemManager.getItem(bitem_id);   item python:here.marketItems.getItem(bitem.marketItemId);   x repeat/bitem_id/number

[Zope] Sorting Not Sorting

2007-08-03 Thread tonylabarbara
Hi; I have this code: table cellpadding=0 width=75% border=0 ?? tal:define=category python:getattr(request, 'category', ''); ?? items python:here.EMarket.marketItems.getItemsInCategory(category); ?? sort_on python:(('name', 'cmp', 'desc'),); ??

[Zope] What If It Doesn't Have a Key?

2007-08-13 Thread tonylabarbara
Hi; I have this line of code: span tal:condition=python:request.has_key('checkbox_1') tal:omit-tag= I would like to do the exact opposite of that. In other words, have the condition render if checkbox_1 does not exist. How do I do that? TIA, Tony

Re: [Zope] What If It Doesn't Have a Key?

2007-08-13 Thread tonylabarbara
Oh ;) Thanks. Tony -Original Message- From: Andreas Jung [EMAIL PROTECTED] To: [EMAIL PROTECTED]; zope@zope.org Sent: Mon, 13 Aug 2007 12:47 pm Subject: Re: [Zope] What If It Doesn't Have a Key? ? --On 13. August 2007 12:36:13 -0400 [EMAIL PROTECTED] wrote:? ? Hi;? I have this

[Zope] Form-Through-Script

2007-08-13 Thread tonylabarbara
Hi; I have a form that I need to send to a script and then send off to a URL (PayPal). I need to process it through the script to renumber things for PP. How do I do this? I imagine I add an element to the PT like so: form action=renumberTheCart(here/CheckOutAfterEditStuff) method=post but I

Re: [Zope] Form-Through-Script

2007-08-13 Thread tonylabarbara
No, it should work the way it is...that is a URL I passed. I changed it to an absolute URL just to double-check, and got basically the same error: Invalid request The parameter, doc, was omitted from the request. How do I pass the parameter, which in my case is quite long and stashed neatly

Re: [Zope] Form-Through-Script

2007-08-13 Thread tonylabarbara
multipart/form-data The content-type, right? That threw this error: Compilation failed xml.parsers.expat.ExpatError: unbound prefix: line 1, column 0 TIA, Tony -Original Message- From: Tom Von Lahndorff [EMAIL PROTECTED] To: Andreas Jung [EMAIL PROTECTED] Cc: [EMAIL PROTECTED];

Re: [Zope] Form-Through-Script

2007-08-14 Thread tonylabarbara
That is *exactly* what I'm trying to do. But again, I can't send the parameter to the script, which in this case, is the entire document. Please see the other post I'm sending up right now. TIA, Tony -Original Message- From: Tom Von Lahndorff [EMAIL PROTECTED] To: [EMAIL PROTECTED]

Re: [Zope] Form-Through-Script

2007-08-14 Thread tonylabarbara
I don't think I've misunderstood you and I have done what I believe I understand you to say. I can't check the browser (generated)?code because I get an error stating I haven't passed the requisite variable to the script. The variable is the entire document, or at least the hidden variables.

[Zope] How Do I Structure This?

2007-08-15 Thread tonylabarbara
Hi; I have the following PT code: a tal:attributes=href python:here.a_script(str(x)) and I want to structure it, kind of like this: a tal:attributes=structure href python:here.a_script(str(x)) How do I do that? TIA, Tony AOL

Re: [Zope] How Do I Structure This?

2007-08-15 Thread tonylabarbara
Bummer. Well, I'm trying to call a script that will render content to the Web, like this: a tal:attributes=href python:here.a_script(str(x)) which calls a script that does this: return htmlbody + x + /body/html but of course it delivers this to the browser:

Re: [Zope] How Do I Structure This?

2007-08-15 Thread tonylabarbara
I tried this: a tal:attributes=href string:${here/a_script}?doc=${x} but got this error: Error Type: TypeError Error Value: a_script() takes exactly 1 argument (0 given) Next, I rewrote the script to put in a try statement for the variable, to test that, but before I even got to test I looked at

Re: [Zope] How Do I Structure This?

2007-08-15 Thread tonylabarbara
Well, I'm trying to do the following: 1) generate a list of variables using tal:define 2) pass those variables to a script, that will then make a few edits and render everything as an HTML page. I'm doing this as a work-around to the problem I posted earlier, that nobody apparently could

Re: [Zope] How Do I Structure This?

2007-08-15 Thread tonylabarbara
Oops...forgot the absolute_url part :-) Works fine now. Thanks! Tony -Original Message- From: Chris Withers [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; zope@zope.org Sent: Wed, 15 Aug 2007 11:05 am Subject: Re: [Zope] How Do I Structure This? Ah Tony,? ? looks

[Zope] Another Structure Problem

2007-08-15 Thread tonylabarbara
Hi; I can work around this one, but it's not as elegant and will waste an hour or so. Here's the problem I'd like to resolve. I have this line of code: a tal:attributes=href string:${here/renumberTheCart/absolute_url}?doc=${here/CheckOutAfterEditStuff}test/a The problem is that doc comes back

Re: [Zope] Another Structure Problem

2007-08-15 Thread tonylabarbara
Well, the other fellow said url_quote was well documented, but I haven't found out where :) Since you strongly imply I need url quoting, can you tell me how to url_quote this doc parameter? a tal:attributes=href string:${here/renumberTheCart/absolute_url}?doc=${here/CheckOutAfterEditStuff}

[Zope] URL_Rewrite

2007-08-15 Thread tonylabarbara
I have this line of code: a tal:define=std modules/Products.PythonScripts.standard; url_quote nocall: std/url_quote; x python:url_quote(here/CheckOutAfterEditStuff) tal:attributes=href string:${here/renumberTheCart/absolute_url}?doc=${x}test/a but I get this error: Error Type: NameError

[Zope] Global Variable In PT

2007-08-23 Thread tonylabarbara
Hi: I have this code (editing out the extraneous) at the beginning of a page: body bgcolor=#ff   tal:define=newRow string:yes After calling some other variables (specifically rotating through a changing ¨item¨ (for item in items...)), I try and change newRow: span tal:define=global

[Zope] ZMySQLDA Question

2007-09-27 Thread tonylabarbara
Hi; I want to do something like this in my Page Template: mysql select * from products order by name, newRow; Now, I know I can do this: tal:define=items python:sequence.sort(items, (('name', 'cmp', 'asc'),)) but that only orders by name, not by name *and* newRow. Any ideas? TIA, Tony

Re: [Zope] ZMySQLDA Question

2007-09-27 Thread tonylabarbara
Thanks! -Original Message- From: Andreas Jung [EMAIL PROTECTED] To: [EMAIL PROTECTED]; zope@zope.org Sent: Thu, 27 Sep 2007 3:43 pm Subject: Re: [Zope] ZMySQLDA Question ? --On 27. September 2007 15:37:33 -0400 [EMAIL PROTECTED] wrote:? ? Hi;? I want to do