Discussion:
[Mayan EDMS: 2373] Mayan EDMS NG 3.0 upgrade error
Victor Zele
2018-03-21 16:04:13 UTC
Permalink
I get the below error trying to update my database from 2.7.3 to 3.0.

Any ideas what to check?


(mayan-edms) ***@sjc1-mayan01:/usr/share/mayan-edms# mayan-edms.py
performupgrade
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
--
*CONFIDENTIALITY NOTICE: *

*This transmission may contain information which is Vimo, Inc. (DBA
Getinsured) confidential and/or legally privileged. The information is
intended only for the use of the individual or entity named on this
transmission. If you are not the intended recipient, you are hereby
notified that any disclosure, copying, or distribution of the contents of
this transmission is strictly prohibited. If you have received this
transmission in error, please immediately notify me by return e-mail and
destroy all copies of the original message.*
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Victor Zele
2018-03-22 00:26:31 UTC
Permalink
Hi,

I was able to track down the migration files causing this error but don't
seem to be able to correct the dependances in them.

/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_states/migrations/0005_auto_20170803_0638.py
-- contains ---
class Migration(migrations.Migration):

dependencies = [
('events', '0006_objecteventsubscription'),
('document_states', '0004_workflow_internal_name'),
]

and

/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/events/migrations/0006_objecteventsubscription.py

not sure how to get the event migration files to load first???

thanks!
Post by Victor Zele
I get the below error trying to update my database from 2.7.3 to 3.0.
Any ideas what to check?
performupgrade
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
--
*CONFIDENTIALITY NOTICE: *

*This transmission may contain information which is Vimo, Inc. (DBA
Getinsured) confidential and/or legally privileged. The information is
intended only for the use of the individual or entity named on this
transmission. If you are not the intended recipient, you are hereby
notified that any disclosure, copying, or distribution of the contents of
this transmission is strictly prohibited. If you have received this
transmission in error, please immediately notify me by return e-mail and
destroy all copies of the original message.*
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Price
2018-03-22 07:56:12 UTC
Permalink
Hi! Thanks for reporting this. I've started working on fixing this issue.
I'm removing all the squashed migrations, they were causing too many
problems. This feature of Django is not ready for production.
Post by Victor Zele
Hi,
I was able to track down the migration files causing this error but don't
seem to be able to correct the dependances in them.
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_states/migrations/0005_auto_20170803_0638.py
-- contains ---
dependencies = [
('events', '0006_objecteventsubscription'),
('document_states', '0004_workflow_internal_name'),
]
and
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/events/migrations/0006_objecteventsubscription.py
not sure how to get the event migration files to load first???
thanks!
Post by Victor Zele
I get the below error trying to update my database from 2.7.3 to 3.0.
Any ideas what to check?
performupgrade
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Price
2018-03-22 08:01:47 UTC
Permalink
Are upgrading via the Docker image?

To migrate a specific app the command is:

mayan-edms.py migrate events

To migrate a specific migration of an app the command is:

mayan-edms.py migrate events 0004
Post by Michael Price
Hi! Thanks for reporting this. I've started working on fixing this issue.
I'm removing all the squashed migrations, they were causing too many
problems. This feature of Django is not ready for production.
Post by Victor Zele
Hi,
I was able to track down the migration files causing this error but don't
seem to be able to correct the dependances in them.
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_states/migrations/0005_auto_20170803_0638.py
-- contains ---
dependencies = [
('events', '0006_objecteventsubscription'),
('document_states', '0004_workflow_internal_name'),
]
and
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/events/migrations/0006_objecteventsubscription.py
not sure how to get the event migration files to load first???
thanks!
Post by Victor Zele
I get the below error trying to update my database from 2.7.3 to 3.0.
Any ideas what to check?
performupgrade
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Price
2018-03-22 09:20:43 UTC
Permalink
Released version 3.0.1 which removes the squashed migrations. Give it a try.
Post by Michael Price
Are upgrading via the Docker image?
mayan-edms.py migrate events
mayan-edms.py migrate events 0004
Post by Michael Price
Hi! Thanks for reporting this. I've started working on fixing this issue.
I'm removing all the squashed migrations, they were causing too many
problems. This feature of Django is not ready for production.
Post by Victor Zele
Hi,
I was able to track down the migration files causing this error but
don't seem to be able to correct the dependances in them.
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_states/migrations/0005_auto_20170803_0638.py
-- contains ---
dependencies = [
('events', '0006_objecteventsubscription'),
('document_states', '0004_workflow_internal_name'),
]
and
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/events/migrations/0006_objecteventsubscription.py
not sure how to get the event migration files to load first???
thanks!
Post by Victor Zele
I get the below error trying to update my database from 2.7.3 to 3.0.
Any ideas what to check?
performupgrade
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Victor Zele
2018-03-22 15:43:12 UTC
Permalink
I am using PIP to install/update, not the docker image.

There is still something wedged with 3.0.1 and get the same error in the
end using your suggestions...

thanks

(mayan-edms) ***@sjc1-mayan01:/usr/share/mayan-edms# *mayan-edms.py
performupgrade*
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
(mayan-edms) ***@sjc1-mayan01:/usr/share/mayan-edms# *mayan-edms.py
migrate events*
No handlers could be found for logger "pyocr.libtesseract"
Traceback (most recent call last):
File "/usr/share/mayan-edms/bin/mayan-edms.py", line 10, in <module>
execute_from_command_line(sys.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 364, in execute_from_command_line
utility.execute()
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 283, in run_from_argv
self.execute(*args, **cmd_options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 330, in execute
output = self.handle(*args, **options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
line 86, in handle
executor.loader.check_consistent_history(connection)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/loader.py",
line 298, in check_consistent_history
connection.alias,
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
(mayan-edms) ***@sjc1-mayan01:/usr/share/mayan-edms# *mayan-edms.py
migrate events 0006*
No handlers could be found for logger "pyocr.libtesseract"
Traceback (most recent call last):
File "/usr/share/mayan-edms/bin/mayan-edms.py", line 10, in <module>
execute_from_command_line(sys.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 364, in execute_from_command_line
utility.execute()
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 283, in run_from_argv
self.execute(*args, **cmd_options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 330, in execute
output = self.handle(*args, **options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
line 86, in handle
executor.loader.check_consistent_history(connection)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/loader.py",
line 298, in check_consistent_history
connection.alias,
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
Post by Michael Price
Released version 3.0.1 which removes the squashed migrations. Give it a try.
Post by Michael Price
Are upgrading via the Docker image?
mayan-edms.py migrate events
mayan-edms.py migrate events 0004
Post by Michael Price
Hi! Thanks for reporting this. I've started working on fixing this
issue. I'm removing all the squashed migrations, they were causing too many
problems. This feature of Django is not ready for production.
Post by Victor Zele
Hi,
I was able to track down the migration files causing this error but
don't seem to be able to correct the dependances in them.
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_states/migrations/0005_auto_20170803_0638.py
-- contains ---
dependencies = [
('events', '0006_objecteventsubscription'),
('document_states', '0004_workflow_internal_name'),
]
and
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/events/migrations/0006_objecteventsubscription.py
not sure how to get the event migration files to load first???
thanks!
Post by Victor Zele
I get the below error trying to update my database from 2.7.3 to 3.0.
Any ideas what to check?
performupgrade
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
--
*CONFIDENTIALITY NOTICE: *

*This transmission may contain information which is Vimo, Inc. (DBA
Getinsured) confidential and/or legally privileged. The information is
intended only for the use of the individual or entity named on this
transmission. If you are not the intended recipient, you are hereby
notified that any disclosure, copying, or distribution of the contents of
this transmission is strictly prohibited. If you have received this
transmission in error, please immediately notify me by return e-mail and
destroy all copies of the original message.*
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Price
2018-03-22 23:55:37 UTC
Permalink
Django migration squashing feature made a mess of things. I managed to
track down the issue. Uploaded version 3.0.2. Give it a go.
Post by Victor Zele
I am using PIP to install/update, not the docker image.
There is still something wedged with 3.0.1 and get the same error in the
end using your suggestions...
thanks
performupgrade*
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
migrate events*
No handlers could be found for logger "pyocr.libtesseract"
File "/usr/share/mayan-edms/bin/mayan-edms.py", line 10, in <module>
execute_from_command_line(sys.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 364, in execute_from_command_line
utility.execute()
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 283, in run_from_argv
self.execute(*args, **cmd_options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 330, in execute
output = self.handle(*args, **options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
line 86, in handle
executor.loader.check_consistent_history(connection)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/loader.py",
line 298, in check_consistent_history
connection.alias,
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
migrate events 0006*
No handlers could be found for logger "pyocr.libtesseract"
File "/usr/share/mayan-edms/bin/mayan-edms.py", line 10, in <module>
execute_from_command_line(sys.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 364, in execute_from_command_line
utility.execute()
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 283, in run_from_argv
self.execute(*args, **cmd_options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 330, in execute
output = self.handle(*args, **options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
line 86, in handle
executor.loader.check_consistent_history(connection)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/loader.py",
line 298, in check_consistent_history
connection.alias,
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
Post by Michael Price
Released version 3.0.1 which removes the squashed migrations. Give it a try.
Post by Michael Price
Are upgrading via the Docker image?
mayan-edms.py migrate events
mayan-edms.py migrate events 0004
Post by Michael Price
Hi! Thanks for reporting this. I've started working on fixing this
issue. I'm removing all the squashed migrations, they were causing too many
problems. This feature of Django is not ready for production.
Post by Victor Zele
Hi,
I was able to track down the migration files causing this error but
don't seem to be able to correct the dependances in them.
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_states/migrations/0005_auto_20170803_0638.py
-- contains ---
dependencies = [
('events', '0006_objecteventsubscription'),
('document_states', '0004_workflow_internal_name'),
]
and
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/events/migrations/0006_objecteventsubscription.py
not sure how to get the event migration files to load first???
thanks!
Post by Victor Zele
I get the below error trying to update my database from 2.7.3 to 3.0.
Any ideas what to check?
performupgrade
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Victor Zele
2018-03-23 04:30:28 UTC
Permalink
Much better. It gave an error later in the process, see below.

thanks!

(mayan-edms) ***@sjc1-mayan01:/usr/share/mayan-edms# mayan-edms.py
performupgrade
No handlers could be found for logger "pyocr.libtesseract"
Operations to perform:
Apply all migrations: acls, actstream, admin, auth, authtoken, autoadmin,
cabinets, checkouts, common, contenttypes, converter, django_gpg, djcelery,
document_comments, document_indexing, document_parsing,
document_signatures, document_states, documents, dynamic_search, events,
linking, lock_manager, mailer, mayan_statistics, metadata, motd, ocr,
permissions, sessions, sites, sources, tags
Running migrations:
Applying acls.0003_auto_20180322_0743... OK
Applying authtoken.0002_auto_20160226_1747... OK
Applying checkouts.0007_auto_20180310_1715... OK
Applying document_states.0010_auto_20180310_1717... OK
Applying document_states.0011_auto_20180315_0029... OK
Applying events.0002_eventsubscription... OK
Applying events.0003_notification... OK
Applying events.0004_auto_20170731_0423... OK
Applying events.0005_auto_20170731_0452... OK
Applying events.0006_objecteventsubscription... OK
Applying events.0007_auto_20170802_0823... OK
Applying events.0008_auto_20180315_0029... OK
Applying linking.0006_auto_20180322_0743... OK
Applying metadata.0008_auto_20180310_1715... OK
Applying metadata.0009_auto_20180322_0743... OK


document_signatures.tasks <12795> [ERROR] "task_verify_document_version()
line 83 File missing for document version ID 16289; [Errno 2] No such file
or directory:
u'/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/media/document_storage/a5985893-a3c5-47f0-8b8c-12bbb889b99f'"
CommandError: Error during post_upgrade signal; File missing for document
version ID 16289; [Errno 2] No such file or directory:
u'/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/media/document_storage/a5985893-a3c5-47f0-8b8c-12bbb889b99f'
Post by Michael Price
Django migration squashing feature made a mess of things. I managed to
track down the issue. Uploaded version 3.0.2. Give it a go.
Post by Victor Zele
I am using PIP to install/update, not the docker image.
There is still something wedged with 3.0.1 and get the same error in the
end using your suggestions...
thanks
performupgrade*
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
migrate events*
No handlers could be found for logger "pyocr.libtesseract"
File "/usr/share/mayan-edms/bin/mayan-edms.py", line 10, in <module>
execute_from_command_line(sys.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 364, in execute_from_command_line
utility.execute()
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 283, in run_from_argv
self.execute(*args, **cmd_options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 330, in execute
output = self.handle(*args, **options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
line 86, in handle
executor.loader.check_consistent_history(connection)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/loader.py",
line 298, in check_consistent_history
connection.alias,
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
migrate events 0006*
No handlers could be found for logger "pyocr.libtesseract"
File "/usr/share/mayan-edms/bin/mayan-edms.py", line 10, in <module>
execute_from_command_line(sys.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 364, in execute_from_command_line
utility.execute()
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 283, in run_from_argv
self.execute(*args, **cmd_options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 330, in execute
output = self.handle(*args, **options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
line 86, in handle
executor.loader.check_consistent_history(connection)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/loader.py",
line 298, in check_consistent_history
connection.alias,
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
Post by Michael Price
Released version 3.0.1 which removes the squashed migrations. Give it a try.
Post by Michael Price
Are upgrading via the Docker image?
mayan-edms.py migrate events
mayan-edms.py migrate events 0004
Post by Michael Price
Hi! Thanks for reporting this. I've started working on fixing this
issue. I'm removing all the squashed migrations, they were causing too many
problems. This feature of Django is not ready for production.
Post by Victor Zele
Hi,
I was able to track down the migration files causing this error but
don't seem to be able to correct the dependances in them.
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_states/migrations/0005_auto_20170803_0638.py
-- contains ---
dependencies = [
('events', '0006_objecteventsubscription'),
('document_states', '0004_workflow_internal_name'),
]
and
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/events/migrations/0006_objecteventsubscription.py
not sure how to get the event migration files to load first???
thanks!
Post by Victor Zele
I get the below error trying to update my database from 2.7.3 to 3.0.
Any ideas what to check?
performupgrade
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
--
*CONFIDENTIALITY NOTICE: *

*This transmission may contain information which is Vimo, Inc. (DBA
Getinsured) confidential and/or legally privileged. The information is
intended only for the use of the individual or entity named on this
transmission. If you are not the intended recipient, you are hereby
notified that any disclosure, copying, or distribution of the contents of
this transmission is strictly prohibited. If you have received this
transmission in error, please immediately notify me by return e-mail and
destroy all copies of the original message.*
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Price
2018-03-23 05:10:09 UTC
Permalink
Very good! That error means that the document with the UUID
a5985893-a3c5-47f0-8b8c-12bbb889b99f exists in the database but doesn't
exist in the disk. I can add code to skip this error but that would only
hide the problem and your installation's database and document storage will
still remain out of sync.

If you are using a dummy install of Mayan EDMS NG 3.0.2 to test the upgrade
make sure you copy the document_storage content too.

If this is a production installation, you can do a few things:

- Check a backup of your document_storage and find the file.
- Launch Mayan (metadata 0009 is the last migration), search the document
in question and delete it from the UI.
- Execute "touch
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/media/document_storage/a5985893-a3c5-47f0-8b8c-12bbb889b99f"
to create a blank file and allow the performupgrade command to finish.
Post by Victor Zele
Much better. It gave an error later in the process, see below.
thanks!
performupgrade
No handlers could be found for logger "pyocr.libtesseract"
Apply all migrations: acls, actstream, admin, auth, authtoken,
autoadmin, cabinets, checkouts, common, contenttypes, converter,
django_gpg, djcelery, document_comments, document_indexing,
document_parsing, document_signatures, document_states, documents,
dynamic_search, events, linking, lock_manager, mailer, mayan_statistics,
metadata, motd, ocr, permissions, sessions, sites, sources, tags
Applying acls.0003_auto_20180322_0743... OK
Applying authtoken.0002_auto_20160226_1747... OK
Applying checkouts.0007_auto_20180310_1715... OK
Applying document_states.0010_auto_20180310_1717... OK
Applying document_states.0011_auto_20180315_0029... OK
Applying events.0002_eventsubscription... OK
Applying events.0003_notification... OK
Applying events.0004_auto_20170731_0423... OK
Applying events.0005_auto_20170731_0452... OK
Applying events.0006_objecteventsubscription... OK
Applying events.0007_auto_20170802_0823... OK
Applying events.0008_auto_20180315_0029... OK
Applying linking.0006_auto_20180322_0743... OK
Applying metadata.0008_auto_20180310_1715... OK
Applying metadata.0009_auto_20180322_0743... OK
document_signatures.tasks <12795> [ERROR] "task_verify_document_version()
line 83 File missing for document version ID 16289; [Errno 2] No such file
u'/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/media/document_storage/a5985893-a3c5-47f0-8b8c-12bbb889b99f'"
CommandError: Error during post_upgrade signal; File missing for document
u'/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/media/document_storage/a5985893-a3c5-47f0-8b8c-12bbb889b99f'
Post by Michael Price
Django migration squashing feature made a mess of things. I managed to
track down the issue. Uploaded version 3.0.2. Give it a go.
Post by Victor Zele
I am using PIP to install/update, not the docker image.
There is still something wedged with 3.0.1 and get the same error in the
end using your suggestions...
thanks
performupgrade*
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
migrate events*
No handlers could be found for logger "pyocr.libtesseract"
File "/usr/share/mayan-edms/bin/mayan-edms.py", line 10, in <module>
execute_from_command_line(sys.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 364, in execute_from_command_line
utility.execute()
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 283, in run_from_argv
self.execute(*args, **cmd_options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 330, in execute
output = self.handle(*args, **options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
line 86, in handle
executor.loader.check_consistent_history(connection)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/loader.py",
line 298, in check_consistent_history
connection.alias,
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
migrate events 0006*
No handlers could be found for logger "pyocr.libtesseract"
File "/usr/share/mayan-edms/bin/mayan-edms.py", line 10, in <module>
execute_from_command_line(sys.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 364, in execute_from_command_line
utility.execute()
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 283, in run_from_argv
self.execute(*args, **cmd_options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 330, in execute
output = self.handle(*args, **options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
line 86, in handle
executor.loader.check_consistent_history(connection)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/loader.py",
line 298, in check_consistent_history
connection.alias,
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
Post by Michael Price
Released version 3.0.1 which removes the squashed migrations. Give it a try.
Post by Michael Price
Are upgrading via the Docker image?
mayan-edms.py migrate events
mayan-edms.py migrate events 0004
Post by Michael Price
Hi! Thanks for reporting this. I've started working on fixing this
issue. I'm removing all the squashed migrations, they were causing too many
problems. This feature of Django is not ready for production.
Post by Victor Zele
Hi,
I was able to track down the migration files causing this error but
don't seem to be able to correct the dependances in them.
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_states/migrations/0005_auto_20170803_0638.py
-- contains ---
dependencies = [
('events', '0006_objecteventsubscription'),
('document_states', '0004_workflow_internal_name'),
]
and
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/events/migrations/0006_objecteventsubscription.py
not sure how to get the event migration files to load first???
thanks!
Post by Victor Zele
I get the below error trying to update my database from 2.7.3 to 3.0.
Any ideas what to check?
performupgrade
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Victor Zele
2018-03-23 05:27:54 UTC
Permalink
Yep all works now and back in business! Will clean out the empty docs as
needed.

thanks
Post by Michael Price
Very good! That error means that the document with the UUID
a5985893-a3c5-47f0-8b8c-12bbb889b99f exists in the database but doesn't
exist in the disk. I can add code to skip this error but that would only
hide the problem and your installation's database and document storage will
still remain out of sync.
If you are using a dummy install of Mayan EDMS NG 3.0.2 to test the
upgrade make sure you copy the document_storage content too.
- Check a backup of your document_storage and find the file.
- Launch Mayan (metadata 0009 is the last migration), search the document
in question and delete it from the UI.
- Execute "touch
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/media/document_storage/a5985893-a3c5-47f0-8b8c-12bbb889b99f"
to create a blank file and allow the performupgrade command to finish.
Post by Victor Zele
Much better. It gave an error later in the process, see below.
thanks!
performupgrade
No handlers could be found for logger "pyocr.libtesseract"
Apply all migrations: acls, actstream, admin, auth, authtoken,
autoadmin, cabinets, checkouts, common, contenttypes, converter,
django_gpg, djcelery, document_comments, document_indexing,
document_parsing, document_signatures, document_states, documents,
dynamic_search, events, linking, lock_manager, mailer, mayan_statistics,
metadata, motd, ocr, permissions, sessions, sites, sources, tags
Applying acls.0003_auto_20180322_0743... OK
Applying authtoken.0002_auto_20160226_1747... OK
Applying checkouts.0007_auto_20180310_1715... OK
Applying document_states.0010_auto_20180310_1717... OK
Applying document_states.0011_auto_20180315_0029... OK
Applying events.0002_eventsubscription... OK
Applying events.0003_notification... OK
Applying events.0004_auto_20170731_0423... OK
Applying events.0005_auto_20170731_0452... OK
Applying events.0006_objecteventsubscription... OK
Applying events.0007_auto_20170802_0823... OK
Applying events.0008_auto_20180315_0029... OK
Applying linking.0006_auto_20180322_0743... OK
Applying metadata.0008_auto_20180310_1715... OK
Applying metadata.0009_auto_20180322_0743... OK
document_signatures.tasks <12795> [ERROR] "task_verify_document_version()
line 83 File missing for document version ID 16289; [Errno 2] No such file
u'/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/media/document_storage/a5985893-a3c5-47f0-8b8c-12bbb889b99f'"
CommandError: Error during post_upgrade signal; File missing for document
u'/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/media/document_storage/a5985893-a3c5-47f0-8b8c-12bbb889b99f'
Post by Michael Price
Django migration squashing feature made a mess of things. I managed to
track down the issue. Uploaded version 3.0.2. Give it a go.
Post by Victor Zele
I am using PIP to install/update, not the docker image.
There is still something wedged with 3.0.1 and get the same error in
the end using your suggestions...
thanks
performupgrade*
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
migrate events*
No handlers could be found for logger "pyocr.libtesseract"
File "/usr/share/mayan-edms/bin/mayan-edms.py", line 10, in <module>
execute_from_command_line(sys.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 364, in execute_from_command_line
utility.execute()
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 283, in run_from_argv
self.execute(*args, **cmd_options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 330, in execute
output = self.handle(*args, **options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
line 86, in handle
executor.loader.check_consistent_history(connection)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/loader.py",
line 298, in check_consistent_history
connection.alias,
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
migrate events 0006*
No handlers could be found for logger "pyocr.libtesseract"
File "/usr/share/mayan-edms/bin/mayan-edms.py", line 10, in <module>
execute_from_command_line(sys.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 364, in execute_from_command_line
utility.execute()
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 283, in run_from_argv
self.execute(*args, **cmd_options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py",
line 330, in execute
output = self.handle(*args, **options)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
line 86, in handle
executor.loader.check_consistent_history(connection)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/loader.py",
line 298, in check_consistent_history
connection.alias,
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
Post by Michael Price
Released version 3.0.1 which removes the squashed migrations. Give it a try.
Post by Michael Price
Are upgrading via the Docker image?
mayan-edms.py migrate events
mayan-edms.py migrate events 0004
Post by Michael Price
Hi! Thanks for reporting this. I've started working on fixing this
issue. I'm removing all the squashed migrations, they were causing too many
problems. This feature of Django is not ready for production.
Post by Victor Zele
Hi,
I was able to track down the migration files causing this error but
don't seem to be able to correct the dependances in them.
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_states/migrations/0005_auto_20170803_0638.py
-- contains ---
dependencies = [
('events', '0006_objecteventsubscription'),
('document_states', '0004_workflow_internal_name'),
]
and
/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/events/migrations/0006_objecteventsubscription.py
not sure how to get the event migration files to load first???
thanks!
Post by Victor Zele
I get the below error trying to update my database from 2.7.3 to 3.0.
Any ideas what to check?
mayan-edms.py performupgrade
No handlers could be found for logger "pyocr.libtesseract"
CommandError: Error during pre_upgrade signal: Migration
document_states.0005_auto_20170803_0638 is applied before its dependency
events.0006_objecteventsubscription on database 'default'.
--
*CONFIDENTIALITY NOTICE: *

*This transmission may contain information which is Vimo, Inc. (DBA
Getinsured) confidential and/or legally privileged. The information is
intended only for the use of the individual or entity named on this
transmission. If you are not the intended recipient, you are hereby
notified that any disclosure, copying, or distribution of the contents of
this transmission is strictly prohibited. If you have received this
transmission in error, please immediately notify me by return e-mail and
destroy all copies of the original message.*
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...