Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
when you run the tool to generate a bar, then change params to generate another bar will raise:
[on_tool_start] ToolCall:bar_chart
{'data': '15000', 'x_axis': '测试汉字'}
C:\Users\hejl\PycharmProjects\dify\api\core\tools\provider\builtin\chart\tools\bar.py:31: UserWarning: Starting a Matplotlib GUI outside of the main thread will likely fail.
flg, ax = plt.subplots(figsize=(10, 8))
C:\Users\hejl\PycharmProjects\dify\api\core\tools\provider\builtin\chart\tools\bar.py:35: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator.
ax.set_xticklabels(axis, rotation=45, ha="right")
Exception ignored in: <function Image.__del__ at 0x0000018D0AC99080>
Traceback (most recent call last):
File "C:\Users\hejl\.pyenv\pyenv-win\versions\3.12.0\Lib\tkinter\__init__.py", line 4081, in __del__
self.tk.call('image', 'delete', self.name)
RuntimeError: main thread is not in main loop
2024-11-24 21:31:55,681.681 INFO [Thread-9 (process_request_thread)] [_internal.py:97] - 127.0.0.1 - - [25/Nov/2024 13:31:55] "OPTIONS /console/api/apps/d0f351d8-946d-4a62-a074-dc8ac0bf2e11/workflows/draft HTTP/1.1" 200 -
2024-11-24 21:31:55,710.710 INFO [Thread-11 (process_request_thread)] [_internal.py:97] - 127.0.0.1 - - [25/Nov/2024 13:31:55] "POST /console/api/apps/d0f351d8-946d-4a62-a074-dc8ac0bf2e11/workflows/draft HTTP/1.1" 200 -
Exception ignored in: <function Variable.__del__ at 0x0000018D0AC02AC0>
Traceback (most recent call last):
File "C:\Users\hejl\.pyenv\pyenv-win\versions\3.12.0\Lib\tkinter\__init__.py", line 410, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x0000018D0AC02AC0>
Traceback (most recent call last):
File "C:\Users\hejl\.pyenv\pyenv-win\versions\3.12.0\Lib\tkinter\__init__.py", line 410, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x0000018D0AC02AC0>
Traceback (most recent call last):
File "C:\Users\hejl\.pyenv\pyenv-win\versions\3.12.0\Lib\tkinter\__init__.py", line 410, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x0000018D0AC02AC0>
Traceback (most recent call last):
File "C:\Users\hejl\.pyenv\pyenv-win\versions\3.12.0\Lib\tkinter\__init__.py", line 410, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: main thread is not in main loop
Tcl_AsyncDelete: async handler deleted by the wrong thread
Screenshots
Before:
After:
Checklist
[!IMPORTANT]
Please review the checklist below before submitting your pull request.
[ ] This change requires a documentation update, included: Dify Document
[x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
[x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
[x] I've updated the documentation accordingly.
[x] I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
Summary
fixed 2 errors:
Screenshots
Checklist
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint gods