Error When upgrading from version 3 to version 4 [development]

73 views
Skip to first unread message

Anirvan Mandal

unread,
May 12, 2014, 3:03:28 AM5/12/14
to erpnext-dev...@googlegroups.com


This is the stacktrace for the error.

Executing execute:frappe.reload_doc('core', 'doctype', 'version') #2014-02-21 in erpnext
Traceback (innermost last):
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 63, in execute_patch
    exec patchmodule.split("execute:")[1] in globals()
  File "<string>", line 1, in <module>
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 343, in reload_doc
    return frappe.modules.reload_doc(module, dt, dn, force=force)
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/modules/__init__.py", line 35, in reload_doc
    return import_files(module, dt, dn, force=force)
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 17, in import_files
    return import_file(module, dt, dn, force=force)
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 22, in import_file
    ret = import_file_by_path(path, force)
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 50, in import_file_by_path
    import_doc(doc)
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 110, in import_doc
    doc.insert()
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 139, in insert
    self.run_post_save_methods()
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 394, in run_post_save_methods
    self.run_method("on_update")
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 367, in run_method
    return Document.hook(fn)(self, *args, **kwargs)
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 432, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 415, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 365, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 78, in on_update
    updatedb(self.name)
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 376, in updatedb
    tab.sync()
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 169, in sync
    self.create()
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 89, in create
    CHARACTER SET=utf8""" % (self.name, add_text))
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/database.py", line 118, in sql
    self._cursor.execute(query)
  File "/home/anirvan/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/anirvan/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
 ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6),\n\t\t\tmodified datetime(6),\n\t\t\tmodified_by varchar(40),\n\t\t\towner varchar(60),\n' at line 3")

execute:frappe.reload_doc('core', 'doctype', 'version') #2014-02-21: failed: STOPPED
Traceback (most recent call last):
  File "scripts/3to4.py", line 33, in <module>
    migrate(args.site)
  File "scripts/3to4.py", line 27, in migrate
    latest()
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/cli.py", line 63, in new_fn
    return fn(*args, **new_kwargs)
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/cli.py", line 368, in latest
    frappe.modules.patch_handler.run_all()
  File "/home/anirvan/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 27, in run_all
    raise PatchError(patch)
frappe.modules.patch_handler.PatchError: execute:frappe.reload_doc('core', 'doctype', 'version') #2014-02-21

Pratik Vyas

unread,
May 12, 2014, 3:05:07 AM5/12/14
to erpnext-dev...@googlegroups.com
> --
> Note:
>
> If you are posting an issue,
> 1. We should be able to replicate it at our end. So please give us as much
> information as you can. Please see it from the point of view of the person
> receiving the communication.
> 2. Paste your code at http://pastebin.com or http://gist.github.com and send
> only the URL via email
> 3. For sending images, use http://imgur.com or other similar services. Do
> not send images as attachments. Links are good. Same goes for any file you
> are going to send.
>
> End of Note
> ---
> You received this message because you are subscribed to the Google Groups
> "ERPNext Developer Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to erpnext-developer...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/erpnext-developer-forum/9f8dd19a-b032-42ef-ae45-54e47023c05a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Hi Anirvan,

Are you running MariaDB? Also, please delay migration till the next v4 release.

Thanks,

--
Pratik
erpnext

Rushabh Mehta

unread,
May 12, 2014, 3:05:19 AM5/12/14
to erpnext-dev...@googlegroups.com
Have you upgraded to MariaDB?


Anirvan Mandal

unread,
May 12, 2014, 3:15:57 AM5/12/14
to erpnext-dev...@googlegroups.com
There is nothing related to maria db on the installation/upgrade notes. Can you point me to the right documentation.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.

Rushabh Mehta

unread,
May 12, 2014, 3:19:12 AM5/12/14
to erpnext-dev...@googlegroups.com
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a9702d2a-4558-42be-8527-e875f8823d87%40googlegroups.com.

Ferenc

unread,
Jun 30, 2014, 9:42:04 AM6/30/14
to erpnext-dev...@googlegroups.com
Hello,
I am trying to migrate Erpnext3 to 4, using below mentioned link, but got error:
Wrote sites/assets/js/canvasResize.min.js - 22k

Traceback (most recent call last):
  File "scripts/3to4.py", line 3, in <module>
    from frappe.website import rebuild_config
ImportError: cannot import name rebuild_config
root@novierpnext:/home/erpnext/erpnext/frappe-bench#

Pls. advise!

Thank You,
Ferenc
Use Frappe Bench

Anand Doshi

unread,
Jun 30, 2014, 1:50:02 PM6/30/14
to ERPNext Developer's Forum
Hi Ferenc,

Remove that line from 3to4.py and you should be good to go.

-Anand.


To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/f5da3cfd-165b-4fc1-a9cc-be60fe5cab1d%40googlegroups.com.

Ferenc

unread,
Jul 1, 2014, 8:08:40 AM7/1/14
to erpnext-dev...@googlegroups.com
Hi Anand,
I am still trying to migrate Erpnext3 to 4, with no success...
Traceback (most recent call last):
  File "scripts/3to4.py", line 32, in <module>
    migrate(args.site)
  File "scripts/3to4.py", line 23, in migrate
    add_to_installed_apps('frappe', rebuild_sitemap=False)
TypeError: add_to_installed_apps() got an unexpected keyword argument 'rebuild_sitemap'
miki@erpnext4:~/frappe-bench/apps/frappe-bench$

I am able to get separately Erpnext4 and I have also Erpnext3. The main problem is how to migrate data. Is it possible from backup?

Thank You,
Ferenc
Use Frappe Bench

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr...@googlegroups.com.

--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr...@googlegroups.com.

--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.

Rushabh Mehta

unread,
Jul 2, 2014, 12:57:01 AM7/2/14
to erpnext-dev...@googlegroups.com
Update script and run it again.


To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0def03db-3c40-48f0-9440-ed771cd7799e%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages