new method not work after restart ladon-wsgi server only restart computer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ladon |
Invalid
|
Undecided
|
jsgaarde |
Bug Description
If i add new function
to class
for ex:
@ladonize(
def ViewI(self):
return "Hello"
--
and restart wsgi - server : like this:
if __name_
PROJECT_DIR = os.path.
print PROJECT_DIR
sys.
PROJECT_NAME = PROJECT_
print "---"
print PROJECT_NAME
os.
port = 8000
application = LadonWSGIApplic
server = wsgiref.
server.
and try to use new function
from suds.client import Client;
url = 'http://
client1 = Client(url)
client1.
i get error:
client1.
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (31, 0))
-------
MethodNotFound Traceback (most recent call last)
/home/krv/
/home/krv/
297 else:
298 port = default
--> 299 return getattr(port, name)
300
301 def __getitem__(self, name):
/home/krv/
401 else:
402 m = default
--> 403 return getattr(m, name)
404
405 def __getitem__(self, name):
/home/krv/
492 @rtype: L{Method}
493 """
--> 494 return self[name]
495
496 def __getitem__(self, name):
/home/krv/
505 if m is None:
506 qn = '.'.join(
--> 507 raise MethodNotFound, qn
508 return Method(
509
MethodNotFound: Method not found: 'TaleoGateway.
I work in virtualenvwrapper and pip and I created env as: mkvirtualenv --no-site-packages
Changed in ladon: | |
status: | New → Invalid |
Changed in ladon: | |
status: | In Progress → Invalid |
The bug is not in Ladon but the way you use strings. When you ladonize a method to use unicode you must be sure to return that type:
# -*- coding: utf-8 -*-
from ladon.ladonizer import ladonize
class TaleoGateway( object) :
@ladonize( rtype=unicode)
return unicode("Hello")
def ViewI(self):
Best Regards
Jakob Simon-Gaarde