Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Install ERPNext on postgres fails due to 'column "route(500)" does not exist' #18028

Closed
madmath03 opened this issue Jun 21, 2019 · 5 comments

Comments

@madmath03
Copy link
Contributor

Install of ERPNext from develop branch (with frappe also from develop branch) on postgres 10 fails due to column "route(500)" not existing.

Stack trace:

Installing erpnext...
Updating DocTypes for erpnext       : [====Traceback (most recent call last):  ]
   File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
     "__main__", mod_spec)
   File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
     exec(code, run_globals)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
     main()
   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
     click.Group(commands=commands)(prog_name='bench')
   File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 764, in __call__
     return self.main(*args, **kwargs)
   File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 717, in main
     rv = self.invoke(ctx)
   File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
     return _process_result(sub_ctx.command.invoke(sub_ctx))
   File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
     return _process_result(sub_ctx.command.invoke(sub_ctx))
   File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 956, in invoke
     return ctx.invoke(self.callback, **ctx.params)
   File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/click/core.py", line 555, in invoke
     return callback(*args, **kwargs)
   File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
     return f(get_current_context(), *args, **kwargs)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
     ret = f(frappe._dict(ctx.obj), *args, **kwargs)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 170, in install_app
     _install_app(app, verbose=context.verbose)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 84, in install_app
     sync_for(name, force=True, sync_everything=True, verbose=verbose, reset_permissions=True)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/model/sync.py", line 56, in sync_for
     reset_permissions=reset_permissions, for_sync=True)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 66, in import_file_by_path
     ignore_version=ignore_version, reset_permissions=reset_permissions)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 141, in import_doc
     doc.insert()
   File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 258, in insert
     self.run_post_save_methods()
   File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 917, in run_post_save_methods
     self.run_method("on_update")
   File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 786, in run_method
     out = Document.hook(fn)(self, *args, **kwargs)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1055, in composer
     return composed(self, method, *args, **kwargs)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1038, in runner
     add_to_return_value(self, fn(self, *args, **kwargs))
   File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 780, in <lambda>
     fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 279, in on_update
     self.run_module_method("on_doctype_update")
   File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 348, in run_module_method
     getattr(module, method)()
   File "/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/item/item.py", line 1077, in on_doctype_update
     frappe.db.add_index("Item", ["route(500)"])
   File "/home/frappe/frappe-bench/apps/frappe/frappe/database/postgres/database.py", line 254, in add_index
     self.sql("""CREATE INDEX IF NOT EXISTS "{}" ON `{}`("{}")""".format(index_name, table_name, '", "'.join(fields)))
   File "/home/frappe/frappe-bench/apps/frappe/frappe/database/postgres/database.py", line 103, in sql
     return super(PostgresDatabase, self).sql(*args, **kwargs)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 171, in sql
     self._cursor.execute(query)
 psycopg2.ProgrammingError: column "route(500)" does not exist

Updating DocTypes for erpnext       : [=======================                 ]
@gseerden
Copy link

I've had the same issue.

@MrPec
Copy link

MrPec commented Apr 9, 2020

Same issue here...... Did anyone fix that issue?

@mingfang
Copy link

I worked around this issue using this

sed -i -e "s|route(500)|route|" /home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/item/item.py

@zubaer-qu
Copy link

in home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/item/item.py
replace frappe.db.add_index("Item", ["route(500)"]) with frappe.db.add_index("Item", ["route"])

@rmehta
Copy link
Member

rmehta commented Jan 18, 2021

postgres is not yet supported in ERPNext

@rmehta rmehta closed this as completed Jan 18, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants