KeyError in wsgiorg.routing_args with 0.9.7

2008-08-25 Thread technofreak

Hi,

I upgraded my pylons from 0.9.6.x to 0.9.7 using easy_install, after
which my existing pylons application fails to work as before. I get
some deprecation warnings on the shell/terminal from which I do
`paster serve --reload development.ini`, as well as get a stack trace
for KeyError: 'wsgiorg.routing_args' in the browser.

I read this thread ( 
http://groups.google.com/group/pylons-discuss/browse_thread/thread/22ac99d8970e7258
) in this list, but commenting out authkit in middleware.py doesn't
help much.

I get this in the terminal,

Starting subprocess with file monitor
/usr/lib/python2.5/site-packages/Pylons-0.9.7rc1-py2.5.egg/pylons/
templating.py:616: UserWarning: Unbuilt egg for troika [unknown
version] (/home/user/code/svnmycode/myproject/trunk)
  Engine = entry_point.load()
/home/user/code/svnmycode/myproject/trunk/myproject/config/
middleware.py:49: DeprecationWarning: The 'error_template' errorware
argument for customizing EvalException is deprecated, please remove
it. To customize EvalException's HTML, setup your own EvalException
and ErrorMiddlewares instead of using ErrorHandler.
  **config['pylons.errorware'])

And I get the following stack trace in the browser...

 KeyError: 'wsgiorg.routing_args'
clear this
clear this
URL: http://127.0.0.1:5000/
Module weberror.evalexception:428 in respond view
  try:
__traceback_supplement__ = errormiddleware.Supplement,
self, environ
app_iter = self.application(environ,
detect_start_response)

# Don't create a list from a paste.fileapp object
  app_iter = self.application(environ, detect_start_response)
Module authkit.authenticate:290 in __call__ view
  def __call__(self, environ, start_response):
environ.update(self.dct)
return self.app(environ, start_response)

class RequireEnvironKey(object):
  return self.app(environ, start_response)
Module authkit.authenticate.cookie:352 in __call__ view
  headers.extend(set_cookies)
return start_response(status, headers, exc_info)
return self.app(environ, cookie_setting_start_response)

#
  return self.app(environ, cookie_setting_start_response)
Module authkit.authenticate.multi:62 in __call__ view
  return None

app_iter = app(environ, start_response)
if not status_:
raise Exception('WSGI start_response was not called
before a result'
  app_iter = app(environ, start_response)
Module authkit.authenticate.multi:32 in app view
  exc_info_.append(exc_info)
log.debug(Status: %r, Headers: %r, status,
headers)
return self.default(environ, find)

def logging_start_response(status, headers,
exc_info=None):
  return self.default(environ, find)
Module authkit.authenticate:280 in __call__ view
  def __call__(self, environ, start_response):
environ[self.key] = self.object
return self.app(environ, start_response)

class AddDictToEnviron(object):
  return self.app(environ, start_response)
Module authkit.authenticate:303 in __call__ view
  if not environ.has_key(self.key):
raise Exception(self.missing_error%{'key':self.key})
return self.app(environ, start_response)

def get_methods():
  return self.app(environ, start_response)
Module paste.httpexceptions:636 in __call__ view
 []).append(HTTPException)
try:
return self.application(environ, start_response)
except HTTPException, exc:
return exc(environ, start_response)
  return self.application(environ, start_response)
Module pylons.wsgiapp:116 in __call__ view
  return ['%s' %
paste.registry.restorer.get_request_id(environ)]

controller = self.resolve(environ, start_response)
response = self.dispatch(controller, environ,
start_response)

  controller = self.resolve(environ, start_response)
Module pylons.wsgiapp:240 in resolve view
  config = request_config()
config.redirect = self.redirect_to
match = environ['wsgiorg.routing_args'][1]

environ['pylons.routes_dict'] = match
  match = environ['wsgiorg.routing_args'][1]
KeyError: 'wsgiorg.routing_args'


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: Plesae do not remove pylons releases

2008-08-25 Thread Jorge Vargas

On Sat, Aug 23, 2008 at 10:41 AM, Noah Gift [EMAIL PROTECTED] wrote:
 More and more I like the idea of there being an extension to easy_install
 and virtualenv that is like an rpm or deb package.  You have an all
 inclusive package that contains all the actual eggs needed to deploy a
 particular package.  Then the package can be named a specific revision
 number and it actually means something, and it never changes state.
how about
http://pypi.python.org/pypi/EggFreezer/

also
http://pypi.python.org/pypi/bbfreeze/

 Currently because of the way dependencies work with the Python Package
 Index, a specific version of a web framework can mean different things at
 different times, and also work properly sometimes and then not others.  I
 think pulling in dependencies from the Python Package Index seems to be a
 failure largely, as it is just too complex to manage.

Even though I agree with you on principle, I don't think it's that
bad. if used wisely it's a good feature which can produce small breaks
that get fixed very easy (most of the time pin down to an eairler
version, until a patch is worked out)

 On Sat, Aug 23, 2008 at 4:31 AM, Wichert Akkerman [EMAIL PROTECTED] wrote:

 I noticed that 0.9.7beta5 was deleted from
 http://pylonshq.com/download/0.9.7 and as a result several of my
 deployments are now broken since they were pinned to that revision and
 can no longer be installed now. So please: never delete a release after
 uploading it.

 I notice 0.9.7rc1 appeared both there and on pypi but I can not find an
 announcement or changelog for it. Can someone provide those?

 Wichert.



 --
 Wichert Akkerman [EMAIL PROTECTED]It is simple to make things.
 http://www.wiggy.net/   It is hard to make things simple.





 --
 Noah Gift
 http://noahgift.com

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: beaker trac

2008-08-25 Thread Jorge Vargas

On Fri, Aug 22, 2008 at 7:58 PM, Walter Cruz [EMAIL PROTECTED] wrote:

 How can I submit a bug to beaker? The trac requests a password :)

here is how http://wiki.pylonshq.com/display/pylonscommunity/Home

PS: I just notice that page still has references to SVN, that should
be updated, and I don't have edit access :(

 []'s
 - Walter

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: KeyError in wsgiorg.routing_args with 0.9.7

2008-08-25 Thread Mike Orr

On Sun, Aug 24, 2008 at 11:52 PM, technofreak
[EMAIL PROTECTED] wrote:

 Hi,

 I upgraded my pylons from 0.9.6.x to 0.9.7 using easy_install, after
 which my existing pylons application fails to work as before. I get
 some deprecation warnings on the shell/terminal from which I do
 `paster serve --reload development.ini`, as well as get a stack trace
 for KeyError: 'wsgiorg.routing_args' in the browser.

See What's New in Pylons 0.9.7.
http://wiki.pylonshq.com/pages/viewpage.action?pageId=11174779

Note that you have to add three middlewares to middleware.py.

To avoid deprecation errors, at your earliest convenience you'll want
to switch to render_mako, change your WebHelpers imports, and migrate
from the rails helpers to webhelpers.html.tags etc.

If you get routes not matching, add 'map.minimize = True' to
routing.py, or better yet change your routes to not depend on
minimization.

-- 
Mike Orr [EMAIL PROTECTED]

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: Beaker session across multiple sub-domains

2008-08-25 Thread Pavel Skvazh

Solved. Thanks as usual, Ben!

On Aug 21, 8:09 pm, Ben Bangert [EMAIL PROTECTED] wrote:
 On Aug 21, 2008, at 6:13 AM, Pavel Skvazh wrote:

  The case is that when I work with sub-domain (i.e. my.example.com),
  set some session variables and then go to some other domain (i.e.
 www.example.com) the session is empty. No cookie is issued as well.

  Have anyone faced this issue before and what's the best practice to
  keep the session persistent across sub_domains

 You need to specify to use just the last portion (.example.com) for  
 the beaker cookie. You can set this in your ini file with:
 beaker.session.cookie_domain = .example.com

 Cheers,
 Ben

  smime.p7s
 3KViewDownload
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Storing CC Info: public/private key best option?

2008-08-25 Thread Randy Syring

This is not Pylons specific, so if there is a better place to ask
something like this, please feel free to point me in the right
direction.

I have a customer who wants me to store credit card information so he
can retrieve it and run it manually.  I was thinking about doing
something like this:

user's cc info - post to app over https - app encrypts using public
key - encrypted info stored in DB

admin user requests cc listing - encrypted info retrieved from DB -
encrypted info displayed on screen over https - javascript asks admin
user for private key - javascript decrypts the cc info and displays
on screen

The advantages of doing this is that the private key never leaves the
admin's computer and the credit card information is never transmitted
over the wire in plain text.

So, my question would be:

1) Is there a way in native Python to generate/use public/private key
based encryption?
2) If no to the above, what libraries are avaliable?
3) regardless of the answer to #1  #2, how would one go about using
javascript to decrypt something.  I have seen some packages out there,
but I am not sure how they would interface with the encryption that I
would be using in Python.  Or maybe it doesn't matter, is encryption
done in a standards sort of way such that if Python and Javascript
are both using the same standard they can encrypt and decrypt each
other's information?

I am obviously not very familiar with encryption, so feel free to
correct any misunderstandings I might have.

Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: updating user and current controller state to template

2008-08-25 Thread Krishgy

For your user sign out /register issue, use like this

% request.environ.has_key('REMOTE_USER'):
li firstwelcome ${c.user_name}/li
  % else:
li firsta href=/account/signinSignin/a/li
lia href=/account/newRegister/a/li
  % endif


If you use authkit, authkit middleware shall fill the REMOTE_USER key.
Otherwise you can write your custom middleware to set the REMOTE_USER
option.






On Aug 25, 3:41 am, Jonathan Vanasco [EMAIL PROTECTED] wrote:
 it would be more correct to update c , and not the 'base controller'

 in any event, i think you might have better luck setting
 'self.main_panel' instead of BaseController.main_panel

 messing with class vars can create problems down the road.  after you
 set BaseController.main_panel in your example, its no longer a null
 string for the next class instantiated
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



cache by pathinfo

2008-08-25 Thread Walter Cruz

Hi!

I was trying to add cache to my app, through beaker_cache, but my urls
don't use query params, just pathinfo.

It's planned to add pathinfo support to the cache decorator?

[]'s
- Walter

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: Storing CC Info: public/private key best option?

2008-08-25 Thread Jonathan LaCour

Randy Syring wrote:

 I have a customer who wants me to store credit card information so
 he can retrieve it and run it manually.

There are a host of government regulations that you must follow if
you are planning on storing credit card information on your servers,
and you carry an absolutely massive amount of liability. I would
advise you to avoid this at all costs.

A better option would be to use a third-party service which stores
the credit cards and allows you to run transactions against them
remotely.  A really excellent option is Authorize.NET's Customer
Information Manager, which has a high-quality web service API:

http://authorize.net/solutions/merchantsolutions/merchantservices/cim/

It took me about a day to interface with Authorize.NET CIM, and I
can't recommend it highly enough.

Good luck --

--
Jonathan LaCour
http://cleverdevil.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: expiring cookie based session after a preset amt of time

2008-08-25 Thread jerry

This is what I do:

set session['cookie_expires'] in login controller, then modify
session.cookie_expires accordingly in lib/base.py --

def __before__(self, action):
if not session.get('cookie_expires', True):
session.cookie_expires = False
else:
session.cookie_expires = True

Jerry

On 6 Jul, 23:42, kevin [EMAIL PROTECTED] wrote:
 hello all,

 thanks for the great help so far.  my first pylons project is going
 really well.

 i'm looking for a way to make the session/session cookie expire after
 a certain amount of time.  an example of this behavior would be eBay,
 which expires a cookie session after 24 hours.

 i was looking at 
 thishttp://wiki.pylonshq.com/display/beaker/Configuration+Options

 beaker.session.cookie_expires is probably what i want, but i am not
 sure how to set the time period in my .ini file.  i see that it's
 supposed to take a timedelta object, but i can't instantiate one
 within the context of a config file (can i?).  other docs i've seen
 only describe the session.cookie_expires option as only taking a
 boolean value.

 there's also beaker.session.timeout but that depends on the session
 being idle.

 am i missing something totally obvious?

 a follow-up to this question is, what's the proper way to implement
 the user's remember me preference checkbox.  these are global
 settings for the server, i have poked around looking for the answer on
 the user's ability to set session.cookie_expires to True (session goes
 away on the closing of the browser), but my keywordese isn't good
 enough.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: Plesae do not remove pylons releases

2008-08-25 Thread Noah Gift
More and more I like the idea of there being an extension to easy_install
and virtualenv that is like an rpm or deb package.  You have an all
inclusive package that contains all the actual eggs needed to deploy a
particular package.  Then the package can be named a specific revision
number and it actually means something, and it never changes state.
Currently because of the way dependencies work with the Python Package
Index, a specific version of a web framework can mean different things at
different times, and also work properly sometimes and then not others.  I
think pulling in dependencies from the Python Package Index seems to be a
failure largely, as it is just too complex to manage.

On Sat, Aug 23, 2008 at 4:31 AM, Wichert Akkerman [EMAIL PROTECTED] wrote:


 I noticed that 0.9.7beta5 was deleted from
 http://pylonshq.com/download/0.9.7 and as a result several of my
 deployments are now broken since they were pinned to that revision and
 can no longer be installed now. So please: never delete a release after
 uploading it.

 I notice 0.9.7rc1 appeared both there and on pypi but I can not find an
 announcement or changelog for it. Can someone provide those?

 Wichert.



 --
 Wichert Akkerman [EMAIL PROTECTED]It is simple to make things.
 http://www.wiggy.net/   It is hard to make things simple.

 



-- 
Noah Gift
http://noahgift.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---