[Webware-discuss] AssertionError

2010-04-26 Thread Blaise Vogel
Hello,
I'm using for a long time Webware + cheetah, I have upgraded my Debian Squeeze 
yesterday, and now, I got an AssertionError on any template. Because, I don't 
understand where is the problem, I ask for a little help ;-)
To repeat the problem:
- Debian Squeeze
- Webware 1.0.2 or 1.1
- A simple .tmpl and cheetah compile test.tmpl

-- 
Blaise Vogel
Title: Error




Error

The site is having technical difficulties with this page. An error has
been logged, and the problem will be fixed as soon as possible. Sorry!

Traceback
/home/blaise/tmp/test.py

Traceback (most recent call last):
  File /home/blaise/prgm/Webware-1.1b1/WebKit/Application.py, line 624, in runTransaction [edit]
servlet = findServlet(trans)
  File /home/blaise/prgm/Webware-1.1b1/WebKit/URLParser.py, line 68, in findServletForTransaction [edit]
return self.parse(trans, trans.request().urlPath())
  File /home/blaise/prgm/Webware-1.1b1/WebKit/URLParser.py, line 312, in parse [edit]
return fpp.parse(trans, requestPath)
  File /home/blaise/prgm/Webware-1.1b1/WebKit/URLParser.py, line 422, in parse [edit]
return ServletFactoryManager.servletForFile(trans, name)
  File /home/blaise/prgm/Webware-1.1b1/WebKit/URLParser.py, line 845, in servletForFile [edit]
return factory.servletForTransaction(trans)
  File /home/blaise/prgm/Webware-1.1b1/WebKit/ServletFactory.py, line 236, in servletForTransaction [edit]
theClass = self.loadClass(transaction, path)
  File /home/blaise/prgm/Webware-1.1b1/WebKit/ServletFactory.py, line 375, in loadClass [edit]
assert issubclass(theClass, Servlet)
AssertionError

MiscInfo

filename/home/blaise/tmp/test.py
os.getcwd()/home/blaise/prgm/Webware-1.1b1/WebKit
sys.path['/home/blaise/prgm/Webware-1.1b1', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages', '/usr/lib/pymodules/python2.5', '/usr/lib/pymodules/python2.5/gtk-2.0', '/home/blaise/prgm/Webware-1.1b1/WebKit/Cache/PSP']
sys.version2.5.5 (r255:77872, Feb  2 2010, 00:25:47) 
[GCC 4.4.3]
timeMon Apr 26 07:34:33 2010

Transaction

AttributeValue
applicationWebKit.Application.Application object at 0x4809a210
requestWebKit.HTTPRequest.HTTPRequest object at 0x48c25cf0
responseWebKit.HTTPResponse.HTTPResponse object at 0x48c25c30
servletNone
sessionNone

Application

AttributeValue
contexts
Admin/home/blaise/prgm/Webware-1.1b1/WebKit/Admin
CGIWrapper/Docs/home/blaise/prgm/Webware-1.1b1/CGIWrapper/Docs
Docs/home/blaise/prgm/Webware-1.1b1/Docs
Examples/home/blaise/prgm/Webware-1.1b1/WebKit/Examples
MKBrowser/home/blaise/prgm/Webware-1.1b1/MiddleKit/WebBrowser
MiddleKit/Docs/home/blaise/prgm/Webware-1.1b1/MiddleKit/Docs
MiscUtils/Docs/home/blaise/prgm/Webware-1.1b1/MiscUtils/Docs
PSP/Docs/home/blaise/prgm/Webware-1.1b1/PSP/Docs
PSP/Examples/home/blaise/prgm/Webware-1.1b1/PSP/Examples
TaskKit/Docs/home/blaise/prgm/Webware-1.1b1/TaskKit/Docs
Testing/home/blaise/prgm/Webware-1.1b1/WebKit/Testing
UserKit/Docs/home/blaise/prgm/Webware-1.1b1/UserKit/Docs
WebKit/Docs/home/blaise/prgm/Webware-1.1b1/WebKit/Docs
WebUtils/Docs/home/blaise/prgm/Webware-1.1b1/WebUtils/Docs
default/home/blaise/tmp

serverSidePath'/home/blaise/prgm/Webware-1.1b1/WebKit'
webwarePath'/home/blaise/prgm/Webware-1.1b1'
webwareVersion(1, 1, 0, 'b1')

HTTPRequest

AttributeValue
adapterName''
args
cookies
environ
GATEWAY_INTERFACECGI/1.1
HTTP_ACCEPTtext/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8
HTTP_ACCEPT_CHARSETISO-8859-1, utf-8;q=0.7, *;q=0.7
HTTP_ACCEPT_ENCODINGgzip, deflate
HTTP_ACCEPT_LANGUAGEfr, fr-fr;q=0.8, en-us;q=0.5, en;q=0.3
HTTP_CONNECTIONkeep-alive
HTTP_HOSTlocalhost:8080
HTTP_KEEP_ALIVE300
HTTP_USER_AGENTMozilla/5.0 (X11; U; Linux ppc; fr; rv:1.9.1.9) Gecko/20100414 Iceweasel/3.5.9 (like Firefox/3.5.9)
PATH/usr/local/bin: /usr/bin: /bin: /usr/games
PATH_INFO/test.py
QUERY_STRING
REMOTE_ADDR127.0.0.1
REMOTE_PORT51544
REQUEST_METHODGET
REQUEST_URI/test.py
SCRIPT_NAME
SERVER_ADDR0.0.0.0
SERVER_PORT8080
SERVER_PROTOCOLHTTP/1.0
SERVER_SOFTWAREWebware/1.1b1

fields
method'GET'
pathInfo'/test.py'
pathTranslated''
previousURLPaths[]
queryString''
serverSidePath'/home/blaise/tmp/test.py'
servletPath''
sessionIdNone
uri'/test.py'

HTTPResponse

AttributeValue
args
committedFalse
cookies
endTime1272260073.4919519
headers
Content-typetext/html
Status500 Servlet Error


Environment

COLORFGBG15;0
DBUS_SESSION_BUS_ADDRESSunix:abstract=/tmp/dbus-CpfXLXfurw,guid=16f44c7a21e54a60627a1fa10038
DESKTOP_SESSIONdefault
DISPLAY:0.0
DM_CONTROL/var/run/xdmctl
GS_LIB/home/blaise/.fonts
GTK2_RC_FILES/etc/gtk-2.0/gtkrc:/home/blaise/.gtkrc-2.0::/home/blaise/.kde/share/config/gtkrc-2.0
GTK_RC_FILES/etc/gtk/gtkrc:/home/blaise/.gtkrc::/home/blaise/.kde/share/config/gtkrc
HISTCONTROLignoreboth
HOME/home/blaise
KDE_FULL_SESSIONtrue
KDE_MULTIHEADfalse
KDE_SESSION_UID1001
KDE_SESSION_VERSION4
KONSOLE_DBUS_SERVICE:1.101

Re: [Webware-discuss] AssertionError

2010-04-26 Thread Blaise Vogel

- Christoph Zwerschke c...@online.de a écrit :

 Am 26.04.2010 10:47, schrieb Blaise Vogel:
  Cheetah 2.4.2.1
 
 Thanks. I'll try to look into that later today or tomorrow. I guess
 it's
 caused by Cheetah still using old-style classes or something.
OK, thank you. If you need more info or some help, no problem ;-)

Blaise Vogel


--
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] AssertionError in ServletFactory?

2003-09-10 Thread Randall Randall
This is a followup for people Googling on this problem.

On Monday, June 30, 2003, at 07:57 PM, Randall Randall wrote:
On Wednesday, June 25, 2003, at 04:38 PM, Randall Randall wrote:
I'm getting a weird traceback from one of my servlets:
/Users/randall/Devel/Work/shadowcash/context/editprofile.py
Traceback (most recent call last):
  File /opt/Webware/WebKit/Application.py, line 415, in 
dispatchRequest
self.handleGoodURL(transaction)
  File /opt/Webware/WebKit/Application.py, line 568, in 
handleGoodURL
self.createServletInTransaction(transaction)
  File /opt/Webware/WebKit/Application.py, line 1061, in 
createServletInTransaction
inst = self.getServlet(transaction, path)
  File /opt/Webware/WebKit/Application.py, line 995, in getServlet
inst = factory.servletForTransaction(transaction)
  File ./WebKit/ServletFactory.py, line 199, in 
servletForTransaction
AssertionError
[snip]
I found a similar problem had by Edmund Lian on the Cheetah list,
but the cause there (class name not being the same as the filename)
doesn't seem to apply.
Anyone know why this could be happening?
Well, evidently no one did.

So, having finally got to the deploy on Linux stage, I find
that this error doesn't happen on Linux, but only Mac OS X (my
development platform), which makes me very happy. :)
So, if anyone needs additional information and wants to try to
track this down in Webware 0.8, I'd be happy to give you more
info, but don't know what would be useful.  Eventually I'll try
to do that myself, but it may be some time before I'm able to
take the time.
This turns out to be a problem only in Python 2.2 (and maybe
earlier), and only on Mac OS X, at least for me.
Upgrading to 2.3 earlier this week made it go away completely.

--
Randall Randall [EMAIL PROTECTED]
When you advocate any government action, you must first
believe that violence is the best answer to the question
at hand. -- Allen Thornton


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] AssertionError in ServletFactory?

2003-06-30 Thread Randall Randall
On Wednesday, June 25, 2003, at 04:38 PM, Randall Randall wrote:

Hi, all.

I'm getting a weird traceback from one of my servlets:
/Users/randall/Devel/Work/shadowcash/context/editprofile.py
Traceback (most recent call last):
  File /opt/Webware/WebKit/Application.py, line 415, in 
dispatchRequest
self.handleGoodURL(transaction)
  File /opt/Webware/WebKit/Application.py, line 568, in handleGoodURL
self.createServletInTransaction(transaction)
  File /opt/Webware/WebKit/Application.py, line 1061, in 
createServletInTransaction
inst = self.getServlet(transaction, path)
  File /opt/Webware/WebKit/Application.py, line 995, in getServlet
inst = factory.servletForTransaction(transaction)
  File ./WebKit/ServletFactory.py, line 199, in servletForTransaction
AssertionError
[snip]
I found a similar problem had by Edmund Lian on the Cheetah list,
but the cause there (class name not being the same as the filename)
doesn't seem to apply.
Anyone know why this could be happening?
Well, evidently no one did.

So, having finally got to the deploy on Linux stage, I find
that this error doesn't happen on Linux, but only Mac OS X (my
development platform), which makes me very happy. :)
So, if anyone needs additional information and wants to try to
track this down in Webware 0.8, I'd be happy to give you more
info, but don't know what would be useful.  Eventually I'll try
to do that myself, but it may be some time before I'm able to
take the time.
--
Randall Randall [EMAIL PROTECTED]
Not only can money buy happiness,
 it isn't even particularly expensive any more.  -- Spike Jones


---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
___
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] AssertionError in ServletFactory?

2003-06-30 Thread Randall Randall
On Monday, June 30, 2003, at 09:49 PM, Ian Bicking wrote:
Sorry, I thought someone else might pipe up about it.
Oh, no problem.  It turned out not to be a really serious
problem, but it is annoying. :)
Anyway, this was at one point commonly caused by path problems
(sys.path), where a module can be imported more than once.  Imagine a
path like:
Hm.  The sys.path as reported by the traceback page looks normal; no
duplicates.
Python doesn't recognize that these are the same module, so there are
two classes going by the same name.  You might look at the class's
__module__ attribute to find out more.  It might depend on the way you
are running the AppServer, environmental variables, etc., which would
explain why it works in one environment and not another.
Hm.  Okay.  I'll instrument things a bit and see what happens. :)

Thanks!

--
Randall Randall [EMAIL PROTECTED]
Not only can money buy happiness,
 it isn't even particularly expensive any more.  -- Spike Jones


---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
___
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] AssertionError in ServletFactory?

2003-06-25 Thread Randall Randall
Hi, all.

I'm getting a weird traceback from one of my servlets:
/Users/randall/Devel/Work/shadowcash/context/editprofile.py
Traceback (most recent call last):
  File /opt/Webware/WebKit/Application.py, line 415, in 
dispatchRequest
self.handleGoodURL(transaction)
  File /opt/Webware/WebKit/Application.py, line 568, in handleGoodURL
self.createServletInTransaction(transaction)
  File /opt/Webware/WebKit/Application.py, line 1061, in 
createServletInTransaction
inst = self.getServlet(transaction, path)
  File /opt/Webware/WebKit/Application.py, line 995, in getServlet
inst = factory.servletForTransaction(transaction)
  File ./WebKit/ServletFactory.py, line 199, in servletForTransaction
AssertionError

on which line I find:
assert issubclass(theClass, Servlet)
which would seem to indicate that my class (editprofile) is not
inheriting from Page.  I have a class called Profile that this
servlet subclasses, and all of my servlets that subclass Profile
have the same error, unless they subclass a class that has itself
subclassed Profile.  If that makes sense. :)
So my createprofile servlet inherits from editprofile, but works
fine until it forwards to editprofile after a new profile was
created.
I found a similar problem had by Edmund Lian on the Cheetah list,
but the cause there (class name not being the same as the filename)
doesn't seem to apply.
Anyone know why this could be happening?

--
Randall Randall [EMAIL PROTECTED]
Not only can money buy happiness,
 it isn't even particularly expensive any more.  -- Spike Jones


---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
___
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] AssertionError: assert type(theClass) is ClassType

2003-02-09 Thread Erik Forsberg
Hi!

From time to time, I use Webware+Cheetah Template+FunFormKit to hack
some web stuff I need at the momemt. Usuallly works great, but I tend
to forget some of the quirks from time to time..

Now, I do know that I've had this problem before (loading a newly
created Page with my browser):

 /s/waresite/UppContext/CCWinner.py

Traceback (most recent call last):
  File /s/Webware/WebKit/Application.py, line 397, in dispatchRequest
self.handleInvalidSession(transaction)
  File /s/Webware/WebKit/Application.py, line 532, in handleInvalidSession
self.handleGoodURL(transaction)
  File /s/Webware/WebKit/Application.py, line 562, in handleGoodURL
self.createServletInTransaction(transaction)
  File /s/Webware/WebKit/Application.py, line 1023, in createServletInTransaction
inst = self.getServlet(transaction,path,cache)
  File /s/Webware/WebKit/Application.py, line 966, in getServlet
inst = factory.servletForTransaction(transaction)
  File /s/Webware/WebKit/ServletFactory.py, line 192, in servletForTransaction
assert type(theClass) is ClassType
AssertionError

..but I don't remember what caused the problem. Most irritating! The
servlet I'm trying to load looks like this:

--CCWinner.py--
from WebKit import Page
from FunFormKit.Form import FormServlet, FormDefinition
from FunFormKit import Field
import random

formDef = FormDefinition(CCWinner,
 [Field.TextField(randmax, maxLength=5, size=3),
  Field.SubmitButton(submit,
 description=Randomize me!,
 methodToInvoke=randomize_me)],

 )

class CCWinner(Page, FormServlet):
def __init__(self):
Page.__init__(self)
FormServlet.__init__(self, [formDef])

def title(self):
return A random example..

def randomize_me(self, fields):
maxrandnr = int(fields['randmax'])
randnr = random.randrange(0, maxrndnr)
self.write(Your random number, max %d, is %dp % (maxrandnr,
randnr))

def writeContent(self):
submitted, data = self.processForm()
rf = self.renderableForm()
self.write(rf.htFormTable(bgcolor=#ff))
   

--end--

Now, I have a feeling it was a really simple error, but help would
appreciated anyway - also, If I get a good answer, the next time I get
the problem I'll just ask Google.. :-)

Regards,
\EF
-- 
Erik Forsberg http://www.lysator.liu.se/~forsberg/
GPG/PGP Key: 1024D/0BAC89D9


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss