type object 'SystemUser' has no attribute 'c'

  • Chris Tsongas

    Chris Tsongas - 2008-06-26

    What am I doing wrong!?!?  I have tried jcr 0.6.2rc1, jcr 0.6.0, Python 2.4, Python 2.5, MySql and sqlite and I cannot get passed the error "AttributeError: type object 'SystemUser' has no attribute 'c'".  I even tried modifying some .py files to remove the .c. from the code got further but then the application failed after I logged in.

    I have included my installation log steps (one version of them) and nay help would be appreciated.


    sudo easy_install -f . jcr
    Searching for jcr
    Best match: jcr 0.6.0
    Processing jcr-0.6.0.egg
    removing '/usr/local/lib/python2.4/site-packages/jcr-0.6.0.egg' (and everything under it)
    creating /usr/local/lib/python2.4/site-packages/jcr-0.6.0.egg
    Extracting jcr-0.6.0.egg to /usr/local/lib/python2.4/site-packages
    jcr 0.6.0 is already the active version in easy-install.pth

    Installed /usr/local/lib/python2.4/site-packages/jcr-0.6.0.egg
    Processing dependencies for jcr
    Finished processing dependencies for jcr

    paster make-config jcr jcr.ini
    Distribution already installed:
      jcr 0.6.0 from /usr/local/lib/python2.4/site-packages/jcr-0.6.0.egg
    Creating jcr.ini
    Now you should edit the config files

    paster setup-app jcr.ini
    Running setup_config() from jcr.websetup
      Setting boolean property jcr.superuser.advanceprojects to True
      Setting boolean property sqlalchemy.echo to False
    Turning off SQLAlchemy echo in /usr/local/lib/python2.4/site-packages/jcr-0.6.0.egg/jcr/config/environment.pyc
    Checking and initialising JCR
    1. Confirm values read from the config file

        Database URL:   sqlite:////db/builds/ada/jcr-0.6.0/jcr-sqlite.db
        Base directory: /db/builds/ada/jcr-0.6.0/var

      Are these correct? [Y or N]: y

    2. Checking database
    /usr/local/lib/python2.4/site-packages/jcr-0.6.0.egg/jcr/model/orm.py:24: SADeprecationWarning: The 'transactional' argument to sessionmaker() is deprecated; use autocommit=True|False instead.
      __session = scoped_session(sessionmaker(autoflush=True, transactional=True, bind=config['pylons.g'].sa_engine))

       - Attempting to connect...
         ... Connected OK

       - Checking schema...

      Warning: your database schema has not been created!

      Would you like to have the schema created for you? [Y or N]: y
         Creating schema ...
         ... schema created OK

       - Checking for superuser...
    Traceback (most recent call last):
      File "/usr/local/bin/paster", line 7, in ?
      File "/usr/local/lib/python2.4/site-packages/PasteScript-1.3.6-py2.4.egg/paste/script/command.py", line 78, in run
        invoke(command, command_name, options, args[1:])
      File "/usr/local/lib/python2.4/site-packages/PasteScript-1.3.6-py2.4.egg/paste/script/command.py", line 117, in invoke
        exit_code = runner.run(args)
      File "/usr/local/lib/python2.4/site-packages/PasteScript-1.3.6-py2.4.egg/paste/script/appinstall.py", line 68, in run
        return super(AbstractInstallCommand, self).run(new_args)
      File "/usr/local/lib/python2.4/site-packages/PasteScript-1.3.6-py2.4.egg/paste/script/command.py", line 212, in run
        result = self.command()
      File "/usr/local/lib/python2.4/site-packages/PasteScript-1.3.6-py2.4.egg/paste/script/appinstall.py", line 455, in command
      File "/usr/local/lib/python2.4/site-packages/PasteScript-1.3.6-py2.4.egg/paste/script/appinstall.py", line 592, in setup_config
        mod.setup_config(command, filename, section, vars)
      File "/usr/local/lib/python2.4/site-packages/jcr-0.6.0.egg/jcr/websetup.py", line 35, in setup_config
      File "/usr/local/lib/python2.4/site-packages/jcr-0.6.0.egg/jcr/websetup.py", line 110, in _checkDatabase
      File "/usr/local/lib/python2.4/site-packages/jcr-0.6.0.egg/jcr/websetup.py", line 150, in _checkSuperUser
        allUsers = model.systemuser.allSystemUsers(True)
      File "/usr/local/lib/python2.4/site-packages/jcr-0.6.0.egg/jcr/model/systemuser.py", line 61, in allSystemUsers
        return query.order_by(SystemUser.c.name).all()
    AttributeError: type object 'SystemUser' has no attribute 'c'

    • John Dickson

      John Dickson - 2008-07-02

      Hi Chris

      Sorry about the delay in replying - I didn't notice the message :(

      At a guess, you've been caught by the new version of SQLAlchemy.  They've released version 0.5.0beta1, which breaks backward compatibility with 0.4.x.  I've fixed this in the 0.6.2 final release of JCR, by requiring a 0.4.x version on install.

      To confirm, check your Python site-packages directory, e.g. /usr/lib/python2.5/site-packages for anything starting with SQLAlchemy.  If you have 0.5.0beta1 in there, then try this as root (untested - please sanity check):

        easy_install -m SQLAlchemy
        rm -fR /usr/lib/python2.5/site-packages/SQLAlchemy*    # TODO: adjust path
      Then install/upgrade to JCR 0.6.2, which should lead to SQLAlchemy 0.4.8 being installed.

      Let me know if you still have problems.

      Cheers .................... JD


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks