Closed joshuarestivo closed 1 month ago
Resolved: This was due to having specified an older version of the frappe_docker image in .devcontainer (in frappe_docker). The older image wasn't compatible. Updating the image version resolved the issue.
I am facing same issue. I am trying to use old insights version (v2.1.0) with latest frappe framework (tried with v15.35.0 and above).
Any idea which version of frappe framework would work for insights version v2.1.0. ?
@sunil-mel if you have a local setup, can you try adding "numpy<2" in the dependencies section of pyproject.toml
file?
I haven't encountered this error yet on any instance so can't debug it further
I'm getting the following with Insights v2.1.4 and 2.2.3. This is occurring within an up-to-date frappe_docker environment.
Python: v3.11.6 Frappe: v15.36.0
Installing insights... Traceback (most recent call last): File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/workspace/development/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 114, in
main()
File "/workspace/development/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
click.Group(commands=commands)(prog_name="bench")
File "/workspace/development/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/apps/frappe/frappe/commands/site.py", line 68, in new_site
_new_site(
File "/workspace/development/frappe-bench/apps/frappe/frappe/installer.py", line 112, in _new_site
install_app(app, verbose=verbose, set_as_patched=not source_sql, force=False)
File "/workspace/development/frappe-bench/apps/frappe/frappe/installer.py", line 301, in install_app
sync_for(name, force=force, reset_permissions=True)
File "/workspace/development/frappe-bench/apps/frappe/frappe/model/sync.py", line 111, in sync_for
import_file_by_path(
File "/workspace/development/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 146, in import_file_by_path
import_doc(
File "/workspace/development/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 239, in import_doc
doc.insert()
File "/workspace/development/frappe-bench/apps/frappe/frappe/model/document.py", line 315, in insert
self.run_post_save_methods()
File "/workspace/development/frappe-bench/apps/frappe/frappe/model/document.py", line 1128, in run_post_save_methods
self.run_method("on_update")
File "/workspace/development/frappe-bench/apps/frappe/frappe/model/document.py", line 962, in run_method
out = Document.hook(fn)(self, *args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/apps/frappe/frappe/model/document.py", line 1322, in composer
return composed(self, method, args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/apps/frappe/frappe/model/document.py", line 1304, in runner
add_to_return_value(self, fn(self, *args, *kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/apps/frappe/frappe/model/document.py", line 959, in fn
return method_object(args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 531, in on_update
self.run_module_method("on_doctype_update")
File "/workspace/development/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 629, in run_module_method
module = load_doctype_module(self.name, self.module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/apps/frappe/frappe/modules/utils.py", line 254, in load_doctype_module
doctype_python_modules[key] = frappe.get_module(module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/apps/frappe/frappe/init.py", line 1476, in get_module
return importlib.import_module(modulename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/.pyenv/versions/3.11.6/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/workspace/development/frappe-bench/apps/insights/insights/insights/doctype/insights_alert/insights_alert.py", line 12, in
from pandas import DataFrame
File "/workspace/development/frappe-bench/env/lib/python3.11/site-packages/pandas/init.py", line 46, in
from pandas.core.api import (
File "/workspace/development/frappe-bench/env/lib/python3.11/site-packages/pandas/core/api.py", line 1, in
from pandas._libs import (
File "/workspace/development/frappe-bench/env/lib/python3.11/site-packages/pandas/_libs/init.py", line 18, in
from pandas._libs.interval import Interval
File "interval.pyx", line 1, in init pandas._libs.interval
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject