[Zope] Why oh why won't my Gadfly Fly ?

John Platten jplatten@rochester.rr.com
Sun, 26 Dec 1999 12:14:38 -0500


--------------73BA8F056747A8C71C6A8371
Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="4D4F5353"
Content-Transfer-Encoding: 7bit

Michel,

Here is some more testing that I have done which still leads me to think that
something is wrong here:

 http://www.jamenterprises.com:8080

********************
This is the code behind the link "folder_gadfly":
********************

<dtml-var standard_html_header>

<h2><dtml-var title_or_id></h2>

<p>This is the <dtml-var id> Document.</p>

<!--#call "manage_addFolder('Sample')"-->

<!--#call "Sample.manage_addZGadflyConnection('zopadelic', '', 'demo', 'YES',
REQUEST)"-->

<!--#call "Sample.manage_addZSQLMethod('create_table', '1', 'zopadelic', '2',
'create table zopista(col_a integer,col_b integer)')"-->

<!--#call "Sample.create_table.manage_test(REQUEST)"-->

<!--#call "Sample.manage_addZSQLMethod('insert_data', '', 'zopadelic', '',
'insert into zopista (col_a, col_b) values (120, 380)')"-->

<!--#call "Sample.insert_data.manage_test(REQUEST)"-->

<!--#call "Sample.manage_addZSQLMethod('view_data', '', 'zopadelic', '', 'selct
col_a, col_b from zopista')"-->

<p>The Resulting Data is:</p>

<ol>
<!--#with Sample-->
 <!--#in view_data-->
  <li>col_a is <!--#var col_a-->, col_b is <!--#var col_b-->.</li>
 <!--#/in-->
<!--#/with-->
</ol>

<dtml-var standard_html_footer>

********************
And Here are the Results:
********************
               Zope Error

               Zope has encountered an error while publishing this resource.

               Error Type: AttributeError
               Error Value: manage_addZSQLMethod



               Troubleshooting Suggestions

                     The URL may be incorrect.
                     The parameters passed to this resource may be incorrect.
                     A resource that this resource relies on may be encountering
an error.

               For more detailed information about the error, please refer to the
HTML source for this page.

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




Traceback (innermost last):
  File /web1/home1/www/w085036/zope/lib/python/ZPublisher/Publish.py, line 214,
in publish_module
  File /web1/home1/www/w085036/zope/lib/python/ZPublisher/Publish.py, line 179,
in publish
  File /web1/home1/www/w085036/zope/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
    (Object: ElementWithAttributes)
  File /web1/home1/www/w085036/zope/lib/python/ZPublisher/Publish.py, line 165,
in publish
  File /web1/home1/www/w085036/zope/lib/python/ZPublisher/mapply.py, line 160, in
mapply
    (Object: index_html)
  File /web1/home1/www/w085036/zope/lib/python/ZPublisher/Publish.py, line 102,
in call_object
    (Object: index_html)
  File /web1/home1/www/w085036/zope/lib/python/OFS/DTMLDocument.py, line 166, in
__call__
    (Object: index_html)
  File /web1/home1/www/w085036/zope/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
    (Object: index_html)
  File /web1/home1/www/w085036/zope/lib/python/DocumentTemplate/DT_Util.py, line
335, in eval
    (Object: Sample.manage_addZSQLMethod('create_table', '1', 'zopadelic', '2',
'create table zopista(col_a integer,col_b integer)'))
    (Info: Sample)
  File <string>, line 0, in ?
  File /web1/home1/www/w085036/zope/lib/python/DocumentTemplate/DT_Util.py, line
127, in careful_getattr
AttributeError: (see above)



Michel Pelletier wrote:

> Please continue to CC the list.
>
> John Platten wrote:
> >
> >
> > Maybe I just don't understand how exactly "gadfly" is supposed to work,
> > but here is the following notes about what I see with "gadfly":
> >
> > 1. Adding new directories to ./zope/var/gadfly will make new database names
> > (ie. directory names) show up in the pick list for selecting which database
> > to establish a new database connection with, however, when I try to "test"
> > the database connection with the "test-tab" by sumitting SQL to the database
> > connection, yes I do get tracebacks such as the following:
> >
> >                Zope Error
> >
> >                Zope has encountered an error while publishing this resource.
> >
> >                Error Type: NameError
> >                Error Value: 'LIKES' no such relation in DB
>
> I'm no gadfly expert, but it soulds like your gadfly is running fine.
> You just don't have the table 'LIKES' in whatever db you're connecting
> to.  Try using a "create table" type SQL statement.  For more info on
> creating tables, see the gadfly docs.
>
> -Michel
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

--------------73BA8F056747A8C71C6A8371
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Michel,
<p>Here is some more testing that I have done which still leads me to think
that something is wrong here:
<p>&nbsp;<a href="http://www.jamenterprises.com:8080/manage">http://www.jamenterprises.com:8080</a>
<p>********************
<br>This is the code behind the link "folder_gadfly":
<br>********************
<p>&lt;dtml-var standard_html_header>
<p>&lt;h2>&lt;dtml-var title_or_id>&lt;/h2>
<p>&lt;p>This is the &lt;dtml-var id> Document.&lt;/p>
<p>&lt;!--#call "manage_addFolder('Sample')"-->
<p>&lt;!--#call "Sample.manage_addZGadflyConnection('zopadelic', '', 'demo',
'YES', REQUEST)"-->
<p>&lt;!--#call "Sample.manage_addZSQLMethod('create_table', '1', 'zopadelic',
'2', 'create table zopista(col_a integer,col_b integer)')"-->
<p>&lt;!--#call "Sample.create_table.manage_test(REQUEST)"-->
<p>&lt;!--#call "Sample.manage_addZSQLMethod('insert_data', '', 'zopadelic',
'', 'insert into zopista (col_a, col_b) values (120, 380)')"-->
<p>&lt;!--#call "Sample.insert_data.manage_test(REQUEST)"-->
<p>&lt;!--#call "Sample.manage_addZSQLMethod('view_data', '', 'zopadelic',
'', 'selct col_a, col_b from zopista')"-->
<p>&lt;p>The Resulting Data is:&lt;/p>
<p>&lt;ol>
<br>&lt;!--#with Sample-->
<br>&nbsp;&lt;!--#in view_data-->
<br>&nbsp; &lt;li>col_a is &lt;!--#var col_a-->, col_b is &lt;!--#var col_b-->.&lt;/li>
<br>&nbsp;&lt;!--#/in-->
<br>&lt;!--#/with-->
<br>&lt;/ol>
<br>&nbsp;
<br>&lt;dtml-var standard_html_footer>
<p>********************
<br>And Here are the Results:
<br>********************
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Zope Error
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Zope has encountered an error while publishing this resource.
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Error Type: AttributeError
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Error Value: manage_addZSQLMethod
<br>&nbsp;
<br>&nbsp;
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Troubleshooting Suggestions
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
The URL may be incorrect.
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
The parameters passed to this resource may be incorrect.
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
A resource that this resource relies on may be encountering an error.
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
For more detailed information about the error, please refer to the HTML
source for this page.
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
If the error persists please contact the site maintainer. Thank you for
your patience.
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<p>Traceback (innermost last):
<br>&nbsp; File /web1/home1/www/w085036/zope/lib/python/ZPublisher/Publish.py,
line 214, in publish_module
<br>&nbsp; File /web1/home1/www/w085036/zope/lib/python/ZPublisher/Publish.py,
line 179, in publish
<br>&nbsp; File /web1/home1/www/w085036/zope/lib/python/Zope/__init__.py,
line 202, in zpublisher_exception_hook
<br>&nbsp;&nbsp;&nbsp; (Object: ElementWithAttributes)
<br>&nbsp; File /web1/home1/www/w085036/zope/lib/python/ZPublisher/Publish.py,
line 165, in publish
<br>&nbsp; File /web1/home1/www/w085036/zope/lib/python/ZPublisher/mapply.py,
line 160, in mapply
<br>&nbsp;&nbsp;&nbsp; (Object: index_html)
<br>&nbsp; File /web1/home1/www/w085036/zope/lib/python/ZPublisher/Publish.py,
line 102, in call_object
<br>&nbsp;&nbsp;&nbsp; (Object: index_html)
<br>&nbsp; File /web1/home1/www/w085036/zope/lib/python/OFS/DTMLDocument.py,
line 166, in __call__
<br>&nbsp;&nbsp;&nbsp; (Object: index_html)
<br>&nbsp; File /web1/home1/www/w085036/zope/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
<br>&nbsp;&nbsp;&nbsp; (Object: index_html)
<br>&nbsp; File /web1/home1/www/w085036/zope/lib/python/DocumentTemplate/DT_Util.py,
line 335, in eval
<br>&nbsp;&nbsp;&nbsp; (Object: Sample.manage_addZSQLMethod('create_table',
'1', 'zopadelic', '2', 'create table zopista(col_a integer,col_b integer)'))
<br>&nbsp;&nbsp;&nbsp; (Info: Sample)
<br>&nbsp; File &lt;string>, line 0, in ?
<br>&nbsp; File /web1/home1/www/w085036/zope/lib/python/DocumentTemplate/DT_Util.py,
line 127, in careful_getattr
<br>AttributeError: (see above)
<br>&nbsp;
<br>&nbsp;
<p>Michel Pelletier wrote:
<blockquote TYPE=CITE>Please continue to CC the list.
<p>John Platten wrote:
<br>>
<br>>
<br>> Maybe I just don't understand how exactly "gadfly" is supposed to
work,
<br>> but here is the following notes about what I see with "gadfly":
<br>>
<br>> 1. Adding new directories to ./zope/var/gadfly will make new database
names
<br>> (ie. directory names) show up in the pick list for selecting which
database
<br>> to establish a new database connection with, however, when I try
to "test"
<br>> the database connection with the "test-tab" by sumitting SQL to the
database
<br>> connection, yes I do get tracebacks such as the following:
<br>>
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Zope Error
<br>>
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Zope has encountered an error while publishing this resource.
<br>>
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Error Type: NameError
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Error Value: 'LIKES' no such relation in DB
<p>I'm no gadfly expert, but it soulds like your gadfly is running fine.
<br>You just don't have the table 'LIKES' in whatever db you're connecting
<br>to.&nbsp; Try using a "create table" type SQL statement.&nbsp; For
more info on
<br>creating tables, see the gadfly docs.
<p>-Michel
<p>_______________________________________________
<br>Zope maillist&nbsp; -&nbsp; Zope@zope.org
<br><a href="http://lists.zope.org/mailman/listinfo/zope">http://lists.zope.org/mailman/listinfo/zope</a>
<br>**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp; **
<br>(Related lists -
<br>&nbsp;<a href="http://lists.zope.org/mailman/listinfo/zope-announce">http://lists.zope.org/mailman/listinfo/zope-announce</a>
<br>&nbsp;<a href="http://lists.zope.org/mailman/listinfo/zope-dev">http://lists.zope.org/mailman/listinfo/zope-dev</a>
)</blockquote>
</html>

--------------73BA8F056747A8C71C6A8371--