(Migrated) MAXREPEAT error on ubuntu

(This message has been automatically imported from the retired mailing list)

Hello.

I’ve installed zato with packages from zato repositories. I state that I’ve
used packages of ubutnu 12.04 on ubuntu 13.10.

When I launch:
zato --version

It gives me this error:
Traceback (most recent call last):
File “/opt/zato/1.1/bin/zato”, line 87, in
import zato.cli.zato_command
File “/opt/zato/1.1/zato-agent/src/zato/init.py”, line 12, in
import(‘pkg_resources’).declare_namespace(name)
File “/opt/zato/1.1/eggs/distribute-0.6.30-py2.7.egg/pkg_resources.py”,
line 16, in
import sys, os, zipimport, time, re, imp, types
File “/usr/lib/python2.7/re.py”, line 105, in
import sre_compile
File “/usr/lib/python2.7/sre_compile.py”, line 14, in
import sre_parse
File “/usr/lib/python2.7/sre_parse.py”, line 18, in
from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT

Googled around I found this is an error of python 2.7.3, so I have several
ways to workaround this problems:

  1. work with ubutnu 12.04, but all my servers are ubuntu 13.10 (and I hope
    to not fall in tha same problem)
  2. upgrade zato virtualenv: do you know a simply way to do this?
  3. install zato in the old way :frowning:

What do you think?

Thank you

On 04/24/2014 09:04 AM, Giovanni Colapinto wrote:

What do you think?

Hi Giovanni,

I’ve never used Zato on production with 13.10 - generally speaking the
focus is on LTS releases first, so this is 12.04 and now 14.04.

But I have a 13.10 VM around and I can see this apparently was fixed in
a newer Python version, so perhaps you could give this a try?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.10
Release: 13.10
Codename: saucy
$

$ python
Python 2.7.5+ (default, Feb 27 2014, 19:37:08)
[GCC 4.8.1] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

from _sre import MAXREPEAT
MAXREPEAT
4294967295L

On 04/24/2014 09:04 AM, Giovanni Colapinto wrote:

What do you think?

Hi Giovanni,

I’ve never used Zato on production with 13.10 - generally speaking the
focus is on LTS releases first, so this is 12.04 and now 14.04.

But I have a 13.10 VM around and I can see this apparently was fixed in
a newer Python version, so perhaps you could give this a try?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.10
Release: 13.10
Codename: saucy
$

$ python
Python 2.7.5+ (default, Feb 27 2014, 19:37:08)
[GCC 4.8.1] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

from _sre import MAXREPEAT
MAXREPEAT
4294967295L

I try from a fresh ubuntu 13.10 installation:

zato@sysdev04:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.10
Release: 13.10
Codename: saucy

If I try python from root, import of MAXREPEAT went well

If I try python from zato user:
zato@sysdev04:~$ python
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

from _sre import MAXREPEAT
Traceback (most recent call last):
File “”, line 1, in
ImportError: cannot import name MAXREPEAT

I know I’m out of standard, so I’m not offended if you think not to help me
with this problem :slight_smile:

On Thu, Apr 24, 2014 at 9:09 AM, Dariusz Suchojad dsuch@zato.io wrote:

On 04/24/2014 09:04 AM, Giovanni Colapinto wrote:

What do you think?

Hi Giovanni,

I’ve never used Zato on production with 13.10 - generally speaking the
focus is on LTS releases first, so this is 12.04 and now 14.04.

But I have a 13.10 VM around and I can see this apparently was fixed in
a newer Python version, so perhaps you could give this a try?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.10
Release: 13.10
Codename: saucy
$

$ python
Python 2.7.5+ (default, Feb 27 2014, 19:37:08)
[GCC 4.8.1] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

from _sre import MAXREPEAT
MAXREPEAT
4294967295L

On 04/24/2014 09:26 AM, Giovanni Colapinto wrote:

If I try python from root, import of MAXREPEAT went well

If I try python from zato user:
zato@sysdev04:~$ python
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

from _sre import MAXREPEAT
Traceback (most recent call last):
File “”, line 1, in
ImportError: cannot import name MAXREPEAT

I know I’m out of standard, so I’m not offended if you think not to help me
with this problem :slight_smile:

No worries, I’d love to help you, all good on that front. Whether I am
able to is another thing :slight_smile:

What I don’t understand is why you have 2.7.3 whereas here I have 2.7.5
on 13.10?

$ python -V
Python 2.7.5+
$

When you say it works for one user only, are you sure they both use the
same Python binary?

Does ‘which python’ return the same for either?

zato user uses /opt/zato/1.1/bin/python and I think it is correct. root
uses /usr/bin/python

If I launch zato --version from root I got the same problem
root@sysdev04:~# /opt/zato/1.1/bin/zato --version
Traceback (most recent call last):
File “/opt/zato/1.1/bin/zato”, line 87, in
import zato.cli.zato_command
File “/opt/zato/1.1/zato-agent/src/zato/init.py”, line 12, in
import(‘pkg_resources’).declare_namespace(name)
File “/opt/zato/1.1/eggs/distribute-0.6.30-py2.7.egg/pkg_resources.py”,
line 16, in
import sys, os, zipimport, time, re, imp, types
File “/usr/lib/python2.7/re.py”, line 105, in
import sre_compile
File “/usr/lib/python2.7/sre_compile.py”, line 14, in
import sre_parse
File “/usr/lib/python2.7/sre_parse.py”, line 17, in
from sre_constants import *
File “/usr/lib/python2.7/sre_constants.py”, line 18, in
from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT

On Thu, Apr 24, 2014 at 9:32 AM, Dariusz Suchojad dsuch@zato.io wrote:

On 04/24/2014 09:26 AM, Giovanni Colapinto wrote:

If I try python from root, import of MAXREPEAT went well

If I try python from zato user:
zato@sysdev04:~$ python
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

from _sre import MAXREPEAT
Traceback (most recent call last):
File “”, line 1, in
ImportError: cannot import name MAXREPEAT

I know I’m out of standard, so I’m not offended if you think not to help
me
with this problem :slight_smile:

No worries, I’d love to help you, all good on that front. Whether I am
able to is another thing :slight_smile:

What I don’t understand is why you have 2.7.3 whereas here I have 2.7.5
on 13.10?

$ python -V
Python 2.7.5+
$

When you say it works for one user only, are you sure they both use the
same Python binary?

Does ‘which python’ return the same for either?


Dariusz Suchojad

https://zato.io
ESB, SOA, REST, APIs and cloud integrations in Python

On 04/24/2014 09:36 AM, Giovanni Colapinto wrote:

zato user uses /opt/zato/1.1/bin/python and I think it is correct. root
uses /usr/bin/python

That’s interesting - 12.04 also uses 2.7.3 but has no issues with MAXREPEAT.

I wonder if the cause is not a mismatch between the Python binary Zato
is bundled with and the system version, i.e. 2.7.3 vs. 2.7.5.

What I suggest you can give a try is the new zato-build repository

Please clone it on a 13.10 system, visit ./deb/ and run

$ ./build-zato-deb.sh support/1.1 1.1-giovanni 1

This will:

  • Clone branch support/1.1 of the main Zato code repo
  • Create a deb called 1.1-giovanni so it’s not confused with the main one
  • Set the deb’s release version to 1

The deb can be next installed with

$ sudo dpkg -i /path/to/the/newly/created/deb

That way you will have a 13.10 deb for 13.10 OS. Otherwise we’re using
something meant for 12.04 with 13.10 and some things apparently can go
wrong with that setup.

thanks,

I compiled it on another server with ubuntu 13.10 and it works!!! :slight_smile:

Thank you very much

Cheers

On Thu, Apr 24, 2014 at 10:10 AM, Dariusz Suchojad dsuch@zato.io wrote:

On 04/24/2014 09:36 AM, Giovanni Colapinto wrote:

zato user uses /opt/zato/1.1/bin/python and I think it is correct. root
uses /usr/bin/python

That’s interesting - 12.04 also uses 2.7.3 but has no issues with
MAXREPEAT.

I wonder if the cause is not a mismatch between the Python binary Zato
is bundled with and the system version, i.e. 2.7.3 vs. 2.7.5.

What I suggest you can give a try is the new zato-build repository

https://github.com/zatosource/zato-build

Please clone it on a 13.10 system, visit ./deb/ and run

$ ./build-zato-deb.sh support/1.1 1.1-giovanni 1

This will:

  • Clone branch support/1.1 of the main Zato code repo
  • Create a deb called 1.1-giovanni so it’s not confused with the main one
  • Set the deb’s release version to 1

The deb can be next installed with

$ sudo dpkg -i /path/to/the/newly/created/deb

That way you will have a 13.10 deb for 13.10 OS. Otherwise we’re using
something meant for 12.04 with 13.10 and some things apparently can go
wrong with that setup.

thanks,


Dariusz Suchojad

https://zato.io
ESB, SOA, REST, APIs and cloud integrations in Python

On 04/24/2014 10:35 AM, Giovanni Colapinto wrote:

I compiled it on another server with ubuntu 13.10 and it works!!! :slight_smile:

Ok, great to hear it! :slight_smile: