Hi,
We are using Pylons for our portal and we have run into the following issue:
We are using Pylons 0.10 on CentOS Linux. Python version is 2.7.
⇝ AssertionError: sorry, but this version only supports 100 named groups
Module tw.core.middleware:43 in __call__ view
>> return self.wsgi_app(environ, start_response)
Module tw.core.middleware:68 in wsgi_app view
>> resp = req.get_response(self.application)
Module webob.request:1008 in get_response view
Module webob.request:977 in call_application view
Module tw.core.resource_injector:68 in _injector view
>> resp = req.get_response(app)
Module webob.request:1008 in get_response view
Module webob.request:977 in call_application view
Module repoze.who.middleware:107 in __call__ view
>> app_iter = app(environ, wrapper.wrap_start_response)
Module beaker.middleware:152 in __call__ view
>> return self.wrap_app(environ, session_start_response)
Module routes.middleware:84 in __call__ view
>> results = self.mapper.routematch(environ=environ)
Module routes.mapper:690 in routematch view
>> result = self._match(url, environ)
Module routes.mapper:609 in _match view
>> self.create_regs()
Module routes.mapper:560 in create_regs view
>> self._create_regs(*args, **kwargs)
Module routes.mapper:595 in _create_regs view
>> self._master_regexp = re.compile(regexp)
Module re:190 in compile view
>> return _compile(pattern, flags)
Module re:242 in _compile view
>> p = sre_compile.compile(pattern, flags)
Module sre_compile:511 in compile view
>> "sorry, but this version only supports 100 named groups"
AssertionError: sorry, but this version only supports 100 named groups
Could you please let us know if there is any way to increase the number of named groups?
We are stuck because of the issue which is affecting our progress and hence, business.
Would really appreciate your help.
Looking forward to your response and support…
Thanks,
Pinakee Biswas
Director & CTO

Hi Jonathan,
Thanks for your mail.
We would plan to upgrade to latest version of Pylons. The link that you have shared mentions upgrading from 0.9.7 to 1.0 using the interim release 0.10. Our application is already on 0.10. So, do we just make the changes in the files (as mentioned in the link) and we should be all set for 1.0? Or do we have to install any new or upgraded package?
The link doesn’t mention downloading pylons 1.0 and moving our application there. I hope making the changes in files in 0.10 should work.
We have plans to move to Pyramid but I think there is a design/architectural change from Pylons to Pyramid. Hence, we probably have to redo our application for Pyramid. Our application is already live and lots of features are going in considering our business needs. Hence, we do not plan to disturb the flow right now. I hope upgrading to latest version for Pylons for now would be easier – your suggestion would be highly appreciated for this.
Regards,
Pinakee Biswas
Director & CTO

![]()
From: pylons-...@googlegroups.com [mailto:pylons-...@googlegroups.com] On Behalf Of Jonathan Vanasco
Sent: 05 March 2013 23:55
To: pylons-...@googlegroups.com
Subject: Re: Restrictions in named grouped
1. Pylons 0.10 is not really a production release, it was released as a tool for helping migrate projects <1.0 to 1.0. ( http://docs.pylonsproject.org/projects/pylons-webframework/en/latest/upgrading.html )
2. The current version of Pylons is 1.0.1 , you should upgrade to at least that.
3. Pylons is in Maintenance-Only mode. There is no active development going on. You should look into converting your project to Pyramid.
--
Hi Jonathan,
Further adding, our engineer has confirmed that the changes mentioned in the link (that you have shared for upgrade) are already there in our version of Pylons. So, I think we are already using 1.0/1.0.1. I am still unclear if we need to install anything else besides just doing the changes in the files (as mentioned in the shared link).
Also, if we are using 1.0/1.0.1, why are we getting the named group restriction error? Do we still need to upgrade Routes?
Looking forward to your response…
Thanks,
Pinakee Biswas
Director & CTO

Hi Jonathan,
Thanks for your mail.
While upgrading the pylons core to 1.0, I stumbled upon the following error while running paster :
File "/home/pinakee/pylons101_env/lib/python2.7/site-packages/pylons/decorators/__init__.py", line 17, in <module>
from webob.multidict import UnicodeMultiDict
ImportError: cannot import name UnicodeMultiDict
It seems the latest version of WebOb has deprecated UnicodeMultiDict. I tried installing the older version of WebOb (1.0.7/1.0.8) but it is conflicting with the WebOb needed by the latest Pylons.
Looks like a catch 22 situation J.
Could you please help me in resolving the above issue? I am not sure if I have done anything wrong in installation. I just did the following in the virtual environment to install Pylons 1.0:
Ø Pip install “Pylons == 1.0”
Looking forward to your response and support…
Thanks,
Pinakee Biswas
Director & CTO

From: pylons-...@googlegroups.com [mailto:pylons-...@googlegroups.com] On Behalf Of Jonathan Vanasco
Sent: 06 March 2013 22:46
To: pylons-...@googlegroups.com
Cc: vi...@vvidiacom.com
Subject: Re: Restrictions in named grouped
if you're on 0.10 and not having any deprecation warnings , you should be able to switch over to 1.0 without any changes to your code. you just upgrade the pylons core to 1.0/1.01
I believe the 0.10 branch has a lot of extra code that allows for some pylons 0.9.7 idioms to work in the 1.0 environment -- so it effectively supports both. but that comes at a cost of increased overhead.
--
Hi Jonathan,
Thanks for your response and solution.
Now we are facing compatibility issue with Toscawidgets (with Pylons 1.0.1). The version for Toscawidgets is 0.9.9. Following is the error:
File "/home/pinakee/pylons101_env/lib/python2.7/site-packages/ToscaWidgets-0.9.9-py2.7.egg/tw/mods/pylonshf.py", line 11, in <module>
from pylons.templating import render
ImportError: cannot import name render
Not sure which version of Toscawidgets we should use. Or do we need to change “render” to something else?
Would appreciate if you could please let us know the solution for the above.
Looking forward to your response and support…
Thanks,
Pinakee Biswas
Director & CTO

From: pylons-...@googlegroups.com [mailto:pylons-...@googlegroups.com] On Behalf Of Jonathan Vanasco
Sent: 07 March 2013 22:03
To: pylons-...@googlegroups.com
Cc: vi...@vvidiacom.com
Subject: Re: Restrictions in named grouped
Glad you ran into this issue -- I've run into this one before too, and couldn't remember it last week in the "maintenance notes thread".
--
Hi Jonathan,
Now we are facing compatibility issue with Toscawidgets (with Pylons 1.0.1). The version for Toscawidgets is 0.9.9. Following is the error: