[Mayan EDMS: 28] Errot trying to create database....

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 28] Errot trying to create database....

David Herring


I get the same error when I edit settings.py to use mysql or
sqllite3...

any ideas ?

Thx Dave

(mayan)dave@ubuntu:/home/mayan/mayan$ ./manage.py syncdb
/home/mayan/lib/python2.6/site-packages/django/db/__init__.py:60:
DeprecationWarning: Short names for ENGINE in database configurations
are deprecated. Prepend default.ENGINE with 'django.db.backends.'
  DeprecationWarning
/home/mayan/lib/python2.6/site-packages/sentry/__init__.py:7:
UserWarning: Module uuid was already imported from /usr/lib/python2.6/
uuid.pyc, but /home/mayan/lib/python2.6/site-packages is being added
to sys.path
  VERSION = __import__('pkg_resources') \
Traceback (most recent call last):
  File "./manage.py", line 11, in <module>
    execute_manager(settings)
  File "/home/mayan/lib/python2.6/site-packages/django/core/management/
__init__.py", line 438, in execute_manager
    utility.execute()
  File "/home/mayan/lib/python2.6/site-packages/django/core/management/
__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/mayan/lib/python2.6/site-packages/django/core/management/
__init__.py", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/home/mayan/lib/python2.6/site-packages/django/core/management/
__init__.py", line 67, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name,
name))
  File "/home/mayan/lib/python2.6/site-packages/django/utils/
importlib.py", line 35, in import_module
    __import__(name)
  File "/home/mayan/lib/python2.6/site-packages/south/management/
commands/__init__.py", line 10, in <module>
    import django.template.loaders.app_directories
  File "/home/mayan/lib/python2.6/site-packages/django/template/
loaders/app_directories.py", line 23, in <module>
    raise ImproperlyConfigured('ImportError %s: %s' % (app,
e.args[0]))
django.core.exceptions.ImproperlyConfigured: ImportError django_gpg:
cannot import name rpartition
(mayan)dave@ubuntu:/home/mayan/mayan$
Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 31] Errot trying to create database....

David Herring
I see someone else on the issue tracker on github has the same problem....

does this help the debug .. I did use virtualenv

My machine is running Ubuntu 10.04

thx dave

(mayan)dave@ubuntu:/home/mayan/mayan$ pip freeze
APScheduler==2.0.2
Django==1.3.1
MySQL-python==1.2.3
Pillow==1.7.4
South==0.7.3
amqplib==1.0.2
anyjson==0.3.1
celery==2.2.2
cssmin==0.1.4
distribute==0.6.10
django-appconf==0.4.1
django-celery==2.2.2
django-compressor==1.1.1
django-indexer==0.2.1
-e git://github.com/django-mptt/django-mptt.git@0af02a95877041b2fd6d458bd95413dc1666c321#egg=django_mptt-dev
django-pagination==1.0.7
django-paging==0.2.4
django-picklefield==0.1.9
-e git://github.com/rosarior/django-sendfile.git@d40586582e4f94a1ef7f05cedd410d38e5681c82#egg=django_sendfile-dev
django-sentry==1.6.0
django-taggit==0.9.3
django-templatetag-sugar==0.1
djangorestframework==0.2.3
ghostscript==0.4.1
importlib==1.0.2
kombu==2.0.0
pdfminer==20110227
pyparsing==1.5.6
python-dateutil==2.0
python-gnupg==0.2.8
python-hkp==0.1.3
-e git://github.com/ahupp/python-magic.git@a75cf0a4a7790eb106155c947af9612f15693b6e#egg=python_magic-dev
slate==0.3
uuid==1.30
wsgiref==0.1.2
(mayan)dave@ubuntu:/home/mayan/mayan$ ^C


On 22 January 2012 20:24, David Herring <[hidden email]> wrote:

>
>
> I get the same error when I edit settings.py to use mysql or
> sqllite3...
>
> any ideas ?
>
> Thx Dave
>
> (mayan)dave@ubuntu:/home/mayan/mayan$ ./manage.py syncdb
> /home/mayan/lib/python2.6/site-packages/django/db/__init__.py:60:
> DeprecationWarning: Short names for ENGINE in database configurations
> are deprecated. Prepend default.ENGINE with 'django.db.backends.'
>  DeprecationWarning
> /home/mayan/lib/python2.6/site-packages/sentry/__init__.py:7:
> UserWarning: Module uuid was already imported from /usr/lib/python2.6/
> uuid.pyc, but /home/mayan/lib/python2.6/site-packages is being added
> to sys.path
>  VERSION = __import__('pkg_resources') \
> Traceback (most recent call last):
>  File "./manage.py", line 11, in <module>
>    execute_manager(settings)
>  File "/home/mayan/lib/python2.6/site-packages/django/core/management/
> __init__.py", line 438, in execute_manager
>    utility.execute()
>  File "/home/mayan/lib/python2.6/site-packages/django/core/management/
> __init__.py", line 379, in execute
>    self.fetch_command(subcommand).run_from_argv(self.argv)
>  File "/home/mayan/lib/python2.6/site-packages/django/core/management/
> __init__.py", line 261, in fetch_command
>    klass = load_command_class(app_name, subcommand)
>  File "/home/mayan/lib/python2.6/site-packages/django/core/management/
> __init__.py", line 67, in load_command_class
>    module = import_module('%s.management.commands.%s' % (app_name,
> name))
>  File "/home/mayan/lib/python2.6/site-packages/django/utils/
> importlib.py", line 35, in import_module
>    __import__(name)
>  File "/home/mayan/lib/python2.6/site-packages/south/management/
> commands/__init__.py", line 10, in <module>
>    import django.template.loaders.app_directories
>  File "/home/mayan/lib/python2.6/site-packages/django/template/
> loaders/app_directories.py", line 23, in <module>
>    raise ImproperlyConfigured('ImportError %s: %s' % (app,
> e.args[0]))
> django.core.exceptions.ImproperlyConfigured: ImportError django_gpg:
> cannot import name rpartition
> (mayan)dave@ubuntu:/home/mayan/mayan$



--
David Herring
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 33] Re: Errot trying to create database....

rosarior
Administrator
In reply to this post by David Herring
I though the issue reported was a fluke, but you are confirming and it is worrying because I have no idea where the 'rpartion' is comming from.
Doing a string search only yields: Sphinx and Jinja2 which doesn't make sense.

Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 33] Re: Errot trying to create database....

rosarior
Administrator
Thanks, so this only started happening when you edited the settings.py file?

On Sun, Jan 22, 2012 at 4:50 PM, Roberto Rosario <[hidden email]> wrote:
I though the issue reported was a fluke, but you are confirming and it is worrying because I have no idea where the 'rpartion' is comming from.
Doing a string search only yields: Sphinx and Jinja2 which doesn't make sense.


Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 34] Re: Errot trying to create database....

David Herring
In reply to this post by rosarior
Would you like to login to the server and see this for yourself, would
that help you sebug the issue ?

If so you can login to via

ssh [hidden email]
password: dave123

cd /home/mayan

and go from there




On 22 January 2012 20:50, Roberto Rosario
<[hidden email]> wrote:
> I though the issue reported was a fluke, but you are confirming and it is
> worrying because I have no idea where the 'rpartion' is comming from.
> Doing a string search only yields: Sphinx and Jinja2 which doesn't make
> sense.
>



--
David Herring
Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 35] Re: Errot trying to create database....

David Herring
In reply to this post by rosarior
Do you use skype...my name is abadger1406 ...

I want top change the password again as I only meant to email to you...

dave

On 22 January 2012 21:00, Roberto Rosario Gonzalez
<[hidden email]> wrote:

> Thanks, so this only started happening when you edited the settings.py file?
>
>
> On Sun, Jan 22, 2012 at 4:50 PM, Roberto Rosario
> <[hidden email]> wrote:
>>
>> I though the issue reported was a fluke, but you are confirming and it is
>> worrying because I have no idea where the 'rpartion' is comming from.
>> Doing a string search only yields: Sphinx and Jinja2 which doesn't make
>> sense.
>>
>



--
David Herring
Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 36] Re: Errot trying to create database....

David Herring
In reply to this post by rosarior
I don't think settings.py is the cause of the problem....if you run ./manage.py alone you get a error  about a missing django package. I think the problem may be related to the earlier setup oh django with the pip command etc. please feel free to delete what is in /home/mayan and redo your installation instructions...perhaps you will see the cause of the problem.

Thx dave

Sent from my iPad

On 22 Jan 2012, at 21:00, Roberto Rosario Gonzalez <[hidden email]> wrote:

Thanks, so this only started happening when you edited the settings.py file?

On Sun, Jan 22, 2012 at 4:50 PM, Roberto Rosario <[hidden email]> wrote:
I though the issue reported was a fluke, but you are confirming and it is worrying because I have no idea where the 'rpartion' is comming from.
Doing a string search only yields: Sphinx and Jinja2 which doesn't make sense.


Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 38] Re: Errot trying to create database....

rosarior
Administrator
In reply to this post by David Herring
As of now the suspects are Sentry and the OCR app, when both are disabled the error doesn't show up.  However for some unknown reason existing installations are not affected.  Will continue investigating.
Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 38] Re: Errot trying to create database....

David Herring
Thanks for this update. Again let me know if you want me to try/change anything.

I do have a question ... can local files be imported directly from the
filesystem, i.e do they have to be 'copied' into mayan and hence take
up additional storage. The point being can other applications access
this filesystem data whilst also being managed by Mayan ?

Thanks again, Dave

On 23 January 2012 14:16, Roberto Rosario
<[hidden email]> wrote:
> As of now the suspects are Sentry and the OCR app, when both are disabled
> the error doesn't show up.  However for some unknown reason existing
> installations are not affected.  Will continue investigating.



--
David Herring
Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 39] Re: Errot trying to create database....

David Herring
In reply to this post by rosarior
Can I disable these Sentry /OCR on my server, so I can start to
progress with Mayan EDMS, or should I hold off and wait until you have
fully debugged this issue ?

You can still access my server with supplied details, if helpful.

Thx Dave


On 23 January 2012 14:16, Roberto Rosario
<[hidden email]> wrote:
> As of now the suspects are Sentry and the OCR app, when both are disabled
> the error doesn't show up.  However for some unknown reason existing
> installations are not affected.  Will continue investigating.



--
David Herring
Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 41] Re: Errot trying to create database....

rosarior
Administrator
Yes, I can disable these for you in your setup.  Documents can be queued for OCR later on and Sentry is a third party error logger (https://github.com/dcramer/sentry).
Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 42] Re: Errot trying to create database....

rosarior
Administrator
In reply to this post by David Herring
And thank you very much allowing me access to your server, while I still haven't found the core cause it's great to be able to see the bugs in a repeatable way.

Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 43] Re: Errot trying to create database....

rosarior
Administrator
In reply to this post by David Herring
The files are stored and placed under Mayan EDMS "control" to avoid filename clashes (each file gets renamed to its UUID) and stored in a simple flat arrangement in a directory.  This doesn't stop access to the files but it is not recommended because moving, renaming or updating the files directly would throw the database out of sync.  For access to the files the recommended way is to create and index which would create a directory tree like structure in the database and then turn on the index filesystem mirror options which would create an actual directory tree and links to the actual stored files but using the filename of the documents as stored in the database.  This filesystem mirror of the index can them be shared with Samba across the networks.  This access would be read-only, and new versions of the files would have to be uploaded from the web GUI using the new document versioning support.  I would like to improve this situation by adding WebDAV support in the future when I have the right setup to test this out.  For the moment, sadly you would end up with twice the storage space use, but you've given me something to think about and might be able to implement something like you have in mind even with a reduce functionality because Mayan's parts are as decoupled from each other as possible, storage in this case is very decoupled and its behavior is controlled not by the project but by the Storage progamming class.  Why this design?  All the other part don't make any assumptions about the actual file storage, so that Mayan EDMS can work saving files locally, over the network or even across the internet and still operate exactly the same.  If you use the basic storage settings, the files are keep locally but with a special storage backend, something like what you describe could be possible.  Sorry for the long post and explanation.

Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 43] Re: Errot trying to create database....

rosarior
Administrator
In reply to this post by David Herring
The more recent changes pushed to the development branch and the help provided by Dave seem to fix this bug.  If the fix doesn't break anything else it will be backported to the release branch with hotfix v11.2 available soon afterwards.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 59] Re: Errot trying to create database....

Сергей Глита
Perhaps this is due to the lack of kombu 2.0 rpartition?
In celery / utils / __init__.py is
from kombu.utils import gen_unique_id, rpartition

On 24 янв, 09:59, Roberto Rosario <[hidden email]>
wrote:
> The more recent changes pushed to the development branch and the help
> provided by Dave seem to fix this bug.  If the fix doesn't break anything
> else it will be backported to the release branch with hotfix v11.2
> available soon afterwards.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 60] Re: Errot trying to create database....

Сергей Глита
Yes!
pip uninstall kombu
pip install kombu==1.4.2
fix it for me
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 62] Re: Errot trying to create database....

rosarior
Administrator
Excellent thanks a lot!  I had it pined down to either Sentry or Celery, but you really found the specific cause.  Mayan requires Celery 2.2.2 and that hasn't change for a while, which mean this was never a Mayan's issue but something to do upstream with Celery or with the http://pypi.python.org/pypi repository.  I had already removed Celery and Sentry in the development version, but you finding the core cause open the possibility of them being added again in a future release. Thanks!
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 63] Re: Errot trying to create database....

rosarior
Administrator
In reply to this post by Сергей Глита
PS: Have you managed to get office document conversion (via LibreOffice) working?  I remember there were some problems with the distribution.