Yep all works now and back in business!  Will clean out the empty docs as 
needed.

thanks

On Thursday, March 22, 2018 at 10:10:09 PM UTC-7, Michael Price wrote:
>
> 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.
>
> On Friday, March 23, 2018 at 12:30:29 AM UTC-4, Victor Zele wrote:
>>
>> Much better.  It gave an error later in the process, see below.
>>
>> thanks!
>>
>> (mayan-edms) root@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'
>> (mayan-edms) root@sjc1-mayan01:/usr/share/mayan-edms#
>>
>>
>>
>> On Thursday, March 22, 2018 at 4:55:37 PM UTC-7, Michael Price wrote:
>>>
>>> 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.
>>>
>>> On Thursday, March 22, 2018 at 11:43:12 AM UTC-4, Victor Zele wrote:
>>>>
>>>> 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) root@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) root@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) root@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'.
>>>> (mayan-edms) root@sjc1-mayan01:/usr/share/mayan-edms#
>>>>
>>>>
>>>> On Thursday, March 22, 2018 at 2:20:43 AM UTC-7, Michael Price wrote:
>>>>>
>>>>> Released version 3.0.1 which removes the squashed migrations. Give it 
>>>>> a try.
>>>>>
>>>>> On Thursday, March 22, 2018 at 4:01:47 AM UTC-4, Michael Price wrote:
>>>>>>
>>>>>> 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
>>>>>>
>>>>>> On Thursday, March 22, 2018 at 3:56:13 AM UTC-4, Michael Price wrote:
>>>>>>>
>>>>>>> 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. 
>>>>>>>
>>>>>>> On Wednesday, March 21, 2018 at 8:26:31 PM UTC-4, Victor Zele wrote:
>>>>>>>>
>>>>>>>> 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!
>>>>>>>>
>>>>>>>> On Wednesday, March 21, 2018 at 9:04:13 AM UTC-7, Victor Zele wrote:
>>>>>>>>>
>>>>>>>>> I get the below error trying to update my database from 2.7.3 to 
>>>>>>>>> 3.0.
>>>>>>>>>
>>>>>>>>> Any ideas what to check?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> (mayan-edms) root@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to