You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yo can try with a prompt,
"Create a note with contains utf8 characters"
I'm gettings errors like these,
Error executing tool write_note: Failed to write file: Failed to write file C:\Users\EMIR\basic-memory\UTF-8 Information\UTF-8 Characters.md: 'charmap' codec can't encode character '\u0410' in position 1054: character maps to
Error executing tool write_note: Failed to write file: Failed to write file C:\Users\EMIR\basic-memory\UTF-8 Information\UTF-8 Character Encoding.md: 'charmap' codec can't encode character '\u2192' in position 1113: character maps to
Logs During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Scripts\basic-memory.exe\__main__.py", line 8, in <module>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\typer\main.py", line 322, in __call__
return get_command(self)(*args, **kwargs)
│ │ │ └ {}
│ │ └ ()
│ └ <typer.main.Typer object at 0x0000021EB27E7C80>
└ <function get_command at 0x0000021EB0460860>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\click\core.py", line 1161, in __call__
return self.main(*args, **kwargs)
│ │ │ └ {}
│ │ └ ()
│ └ <function TyperGroup.main at 0x0000021EB04453A0>
└ <TyperGroup basic-memory>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\typer\core.py", line 740, in main
return _main(
└ <function _main at 0x0000021EB04445E0>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\typer\core.py", line 195, in _main
rv = self.invoke(ctx)
│ │ └ <click.core.Context object at 0x0000021EADB39100>
│ └ <function MultiCommand.invoke at 0x0000021EAFE46D40>
└ <TyperGroup basic-memory>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\click\core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
│ │ │ │ └ <click.core.Context object at 0x0000021EB56C1D00>
│ │ │ └ <function Command.invoke at 0x0000021EAFE46700>
│ │ └ <TyperCommand mcp>
│ └ <click.core.Context object at 0x0000021EB56C1D00>
└ <function MultiCommand.invoke.<locals>._process_result at 0x0000021EB56BD800>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\click\core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
│ │ │ │ │ └ {}
│ │ │ │ └ <click.core.Context object at 0x0000021EB56C1D00>
│ │ │ └ <function mcp at 0x0000021EB566EFC0>
│ │ └ <TyperCommand mcp>
│ └ <function Context.invoke at 0x0000021EAFE45080>
└ <click.core.Context object at 0x0000021EB56C1D00>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\click\core.py", line 788, in invoke
return __callback(*args, **kwargs)
│ └ {}
└ ()
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\typer\main.py", line 697, in wrapper
return callback(**use_params)
│ └ {}
└ <function mcp at 0x0000021EB3FE6020>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\basic_memory\cli\commands\mcp.py", line 26, in mcp
mcp_server.run()
│ └ <function FastMCP.run at 0x0000021EB53C2B60>
└ <mcp.server.fastmcp.server.FastMCP object at 0x0000021EB52B8680>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\mcp\server\fastmcp\server.py", line 154, in run
anyio.run(self.run_stdio_async)
│ │ │ └ <function FastMCP.run_stdio_async at 0x0000021EB53C3420>
│ │ └ <mcp.server.fastmcp.server.FastMCP object at 0x0000021EB52B8680>
│ └ <function run at 0x0000021EB3B6E3E0>
└ <module 'anyio' from 'C:\\Users\\EMIR\\AppData\\Roaming\\uv\\tools\\basic-memory\\Lib\\site-packages\\anyio\\__init__.py'>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\anyio\_core\_eventloop.py", line 74, in run
return async_backend.run(func, args, {}, backend_options)
│ │ │ │ └ {}
│ │ │ └ ()
│ │ └ <bound method FastMCP.run_stdio_async of <mcp.server.fastmcp.server.FastMCP object at 0x0000021EB52B8680>>
│ └ <classmethod(<function AsyncIOBackend.run at 0x0000021EB57265C0>)>
└ <class 'anyio._backends._asyncio.AsyncIOBackend'>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\anyio\_backends\_asyncio.py", line 2303, in run
return runner.run(wrapper())
│ │ └ <function FastMCP.run_stdio_async at 0x0000021EB566D440>
│ └ <function Runner.run at 0x0000021EAF878E00>
└ <asyncio.runners.Runner object at 0x0000021EB56E4E90>
File "C:\Program Files\Python312\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
│ │ │ └ <Task pending name='mcp.server.fastmcp.server.FastMCP.run_stdio_async' coro=<FastMCP.run_stdio_async() running at C:\Users\EM...
│ │ └ <function BaseEventLoop.run_until_complete at 0x0000021EAF876A20>
│ └ <ProactorEventLoop running=True closed=False debug=False>
└ <asyncio.runners.Runner object at 0x0000021EB56E4E90>
File "C:\Program Files\Python312\Lib\asyncio\base_events.py", line 674, in run_until_complete
self.run_forever()
│ └ <function ProactorEventLoop.run_forever at 0x0000021EAF9460C0>
└ <ProactorEventLoop running=True closed=False debug=False>
File "C:\Program Files\Python312\Lib\asyncio\windows_events.py", line 322, in run_forever
super().run_forever()
File "C:\Program Files\Python312\Lib\asyncio\base_events.py", line 641, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x0000021EAF8787C0>
└ <ProactorEventLoop running=True closed=False debug=False>
File "C:\Program Files\Python312\Lib\asyncio\base_events.py", line 1986, in _run_once
handle._run()
│ └ <function Handle._run at 0x0000021EAF7BEDE0>
└ <Handle Task.task_wakeup(<Future finished result=None>)>
File "C:\Program Files\Python312\Lib\asyncio\events.py", line 88, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle Task.task_wakeup(<Future finished result=None>)>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle Task.task_wakeup(<Future finished result=None>)>
│ └ <member '_context' of 'Handle' objects>
└ <Handle Task.task_wakeup(<Future finished result=None>)>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\mcp\server\lowlevel\server.py", line 518, in _handle_message
await self._handle_request(
│ └ <function Server._handle_request at 0x0000021EB53C13A0>
└ <mcp.server.lowlevel.server.Server object at 0x0000021EB3A7E870>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\mcp\server\lowlevel\server.py", line 552, in _handle_request
response = await handler(req)
│ └ CallToolRequest(method='tools/call', params=CallToolRequestParams(meta=None, name='write_note', arguments={'title': 'UTF-8 Ch...
└ <function Server.call_tool.<locals>.decorator.<locals>.handler at 0x0000021EB3A40A40>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\mcp\server\lowlevel\server.py", line 412, in handler
results = await func(req.params.name, (req.params.arguments or {}))
│ │ │ │ │ │ └ {'title': 'UTF-8 Character Encoding', 'content': "# UTF-8 Character Encoding\n\nUTF-8 (Unicode Transformation Format 8-bit) i...
│ │ │ │ │ └ CallToolRequestParams(meta=None, name='write_note', arguments={'title': 'UTF-8 Character Encoding', 'content': "# UTF-8 Chara...
│ │ │ │ └ CallToolRequest(method='tools/call', params=CallToolRequestParams(meta=None, name='write_note', arguments={'title': 'UTF-8 Ch...
│ │ │ └ 'write_note'
│ │ └ CallToolRequestParams(meta=None, name='write_note', arguments={'title': 'UTF-8 Character Encoding', 'content': "# UTF-8 Chara...
│ └ CallToolRequest(method='tools/call', params=CallToolRequestParams(meta=None, name='write_note', arguments={'title': 'UTF-8 Ch...
└ <bound method FastMCP.call_tool of <mcp.server.fastmcp.server.FastMCP object at 0x0000021EB52B8680>>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\mcp\server\fastmcp\server.py", line 196, in call_tool
result = await self._tool_manager.call_tool(name, arguments, context=context)
│ │ │ │ │ └ Context()
│ │ │ │ └ {'title': 'UTF-8 Character Encoding', 'content': "# UTF-8 Character Encoding\n\nUTF-8 (Unicode Transformation Format 8-bit) i...
│ │ │ └ 'write_note'
│ │ └ <function ToolManager.call_tool at 0x0000021EB531A700>
│ └ <mcp.server.fastmcp.tools.tool_manager.ToolManager object at 0x0000021EB3FAE5A0>
└ <mcp.server.fastmcp.server.FastMCP object at 0x0000021EB52B8680>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\mcp\server\fastmcp\tools\tool_manager.py", line 60, in call_tool
return await tool.run(arguments, context=context)
│ │ │ └ Context()
│ │ └ {'title': 'UTF-8 Character Encoding', 'content': "# UTF-8 Character Encoding\n\nUTF-8 (Unicode Transformation Format 8-bit) i...
│ └ <function Tool.run at 0x0000021EB531B740>
└ Tool(fn=<function write_note at 0x0000021EB566E660>, name='write_note', description='Create or update a markdown note. Return...
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\mcp\server\fastmcp\tools\base.py", line 82, in run
return await self.fn_metadata.call_fn_with_arg_validation(
│ │ └ <function FuncMetadata.call_fn_with_arg_validation at 0x0000021EB531B920>
│ └ FuncMetadata(arg_model=<class 'mcp.server.fastmcp.utilities.func_metadata.write_noteArguments'>)
└ Tool(fn=<function write_note at 0x0000021EB566E660>, name='write_note', description='Create or update a markdown note. Return...
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\mcp\server\fastmcp\utilities\func_metadata.py", line 66, in call_fn_with_arg_validation
return await fn(**arguments_parsed_dict)
│ └ {'title': 'UTF-8 Character Encoding', 'content': "# UTF-8 Character Encoding\n\nUTF-8 (Unicode Transformation Format 8-bit) i...
└ <function write_note at 0x0000021EB566E660>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\basic_memory\mcp\tools\write_note.py", line 75, in write_note
response = await call_put(client, url, json=entity.model_dump())
│ │ │ │ └ <function BaseModel.model_dump at 0x0000021EB10004A0>
│ │ │ └ Entity(title='UTF-8 Character Encoding', content="# UTF-8 Character Encoding\n\nUTF-8 (Unicode Transformation Format 8-bit) i...
│ │ └ '/knowledge/entities/utf-8-information/utf-8-character-encoding'
│ └ <httpx.AsyncClient object at 0x0000021EB53AFFB0>
└ <function call_put at 0x0000021EB315F6A0>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\basic_memory\mcp\tools\utils.py", line 187, in call_put
response = await client.put(
│ └ <function AsyncClient.put at 0x0000021EB52A00E0>
└ <httpx.AsyncClient object at 0x0000021EB53AFFB0>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\httpx\_client.py", line 1896, in put
return await self.request(
│ └ <function AsyncClient.request at 0x0000021EB52979C0>
└ <httpx.AsyncClient object at 0x0000021EB53AFFB0>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\httpx\_client.py", line 1540, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
│ │ │ │ └ <httpx._client.UseClientDefault object at 0x0000021EB51CE030>
│ │ │ └ <httpx._client.UseClientDefault object at 0x0000021EB51CE030>
│ │ └ <Request('PUT', 'http://test/knowledge/entities/utf-8-information/utf-8-character-encoding')>
│ └ <function AsyncClient.send at 0x0000021EB5297BA0>
└ <httpx.AsyncClient object at 0x0000021EB53AFFB0>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\httpx\_client.py", line 1629, in send
response = await self._send_handling_auth(
│ └ <function AsyncClient._send_handling_auth at 0x0000021EB5297C40>
└ <httpx.AsyncClient object at 0x0000021EB53AFFB0>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\httpx\_client.py", line 1657, in _send_handling_auth
response = await self._send_handling_redirects(
│ └ <function AsyncClient._send_handling_redirects at 0x0000021EB5297CE0>
└ <httpx.AsyncClient object at 0x0000021EB53AFFB0>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\httpx\_client.py", line 1694, in _send_handling_redirects
response = await self._send_single_request(request)
│ │ └ <Request('PUT', 'http://test/knowledge/entities/utf-8-information/utf-8-character-encoding')>
│ └ <function AsyncClient._send_single_request at 0x0000021EB5297D80>
└ <httpx.AsyncClient object at 0x0000021EB53AFFB0>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\httpx\_client.py", line 1730, in _send_single_request
response = await transport.handle_async_request(request)
│ │ └ <Request('PUT', 'http://test/knowledge/entities/utf-8-information/utf-8-character-encoding')>
│ └ <function ASGITransport.handle_async_request at 0x0000021EB5283CE0>
└ <httpx.ASGITransport object at 0x0000021EB53AF5F0>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\httpx\_transports\asgi.py", line 170, in handle_async_request
await self.app(scope, receive, send)
│ │ │ │ └ <function ASGITransport.handle_async_request.<locals>.send at 0x0000021EB58B9760>
│ │ │ └ <function ASGITransport.handle_async_request.<locals>.receive at 0x0000021EB566E340>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0'}, 'http_version': '1.1', 'method': 'PUT', 'headers': [(b'host', b'test'), (b'accep...
│ └ <fastapi.applications.FastAPI object at 0x0000021EB53FC2C0>
└ <httpx.ASGITransport object at 0x0000021EB53AF5F0>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\fastapi\applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
│ │ └ <function ASGITransport.handle_async_request.<locals>.send at 0x0000021EB58B9760>
│ └ <function ASGITransport.handle_async_request.<locals>.receive at 0x0000021EB566E340>
└ {'type': 'http', 'asgi': {'version': '3.0'}, 'http_version': '1.1', 'method': 'PUT', 'headers': [(b'host', b'test'), (b'accep...
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\starlette\applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
│ │ │ │ └ <function ASGITransport.handle_async_request.<locals>.send at 0x0000021EB58B9760>
│ │ │ └ <function ASGITransport.handle_async_request.<locals>.receive at 0x0000021EB566E340>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0'}, 'http_version': '1.1', 'method': 'PUT', 'headers': [(b'host', b'test'), (b'accep...
│ └ <starlette.middleware.errors.ServerErrorMiddleware object at 0x0000021EB57340E0>
└ <fastapi.applications.FastAPI object at 0x0000021EB53FC2C0>
> File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\starlette\middleware\errors.py", line 165, in __call__
await self.app(scope, receive, _send)
│ │ │ │ └ <function ServerErrorMiddleware.__call__.<locals>._send at 0x0000021EB58B9800>
│ │ │ └ <function ASGITransport.handle_async_request.<locals>.receive at 0x0000021EB566E340>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0'}, 'http_version': '1.1', 'method': 'PUT', 'headers': [(b'host', b'test'), (b'accep...
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x0000021EB57342F0>
└ <starlette.middleware.errors.ServerErrorMiddleware object at 0x0000021EB57340E0>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
│ │ │ │ │ │ └ <function ServerErrorMiddleware.__call__.<locals>._send at 0x0000021EB58B9800>
│ │ │ │ │ └ <function ASGITransport.handle_async_request.<locals>.receive at 0x0000021EB566E340>
│ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0'}, 'http_version': '1.1', 'method': 'PUT', 'headers': [(b'host', b'test'), (b'accep...
│ │ │ └ <starlette.requests.Request object at 0x0000021EB57CE6C0>
│ │ └ <fastapi.routing.APIRouter object at 0x0000021EB54DF4D0>
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x0000021EB57342F0>
└ <function wrap_app_handling_exceptions at 0x0000021EB3E1CD60>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000021EB58B9440>
│ │ └ <function ASGITransport.handle_async_request.<locals>.receive at 0x0000021EB566E340>
│ └ {'type': 'http', 'asgi': {'version': '3.0'}, 'http_version': '1.1', 'method': 'PUT', 'headers': [(b'host', b'test'), (b'accep...
└ <fastapi.routing.APIRouter object at 0x0000021EB54DF4D0>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\starlette\routing.py", line 714, in __call__
await self.middleware_stack(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000021EB58B9440>
│ │ │ └ <function ASGITransport.handle_async_request.<locals>.receive at 0x0000021EB566E340>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0'}, 'http_version': '1.1', 'method': 'PUT', 'headers': [(b'host', b'test'), (b'accep...
│ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x0000021EB54DF4D0>>
└ <fastapi.routing.APIRouter object at 0x0000021EB54DF4D0>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\starlette\routing.py", line 734, in app
await route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000021EB58B9440>
│ │ │ └ <function ASGITransport.handle_async_request.<locals>.receive at 0x0000021EB566E340>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0'}, 'http_version': '1.1', 'method': 'PUT', 'headers': [(b'host', b'test'), (b'accep...
│ └ <function Route.handle at 0x0000021EB3E1E2A0>
└ APIRoute(path='/knowledge/entities/{permalink:path}', name='create_or_update_entity', methods=['PUT'])
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\starlette\routing.py", line 288, in handle
await self.app(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000021EB58B9440>
│ │ │ └ <function ASGITransport.handle_async_request.<locals>.receive at 0x0000021EB566E340>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0'}, 'http_version': '1.1', 'method': 'PUT', 'headers': [(b'host', b'test'), (b'accep...
│ └ <function request_response.<locals>.app at 0x0000021EB54E1120>
└ APIRoute(path='/knowledge/entities/{permalink:path}', name='create_or_update_entity', methods=['PUT'])
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\starlette\routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000021EB58B9440>
│ │ │ │ └ <function ASGITransport.handle_async_request.<locals>.receive at 0x0000021EB566E340>
│ │ │ └ {'type': 'http', 'asgi': {'version': '3.0'}, 'http_version': '1.1', 'method': 'PUT', 'headers': [(b'host', b'test'), (b'accep...
│ │ └ <starlette.requests.Request object at 0x0000021EB57CED20>
│ └ <function request_response.<locals>.app.<locals>.app at 0x0000021EB58B9620>
└ <function wrap_app_handling_exceptions at 0x0000021EB3E1CD60>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0x0000021EB58B9BC0>
│ │ └ <function ASGITransport.handle_async_request.<locals>.receive at 0x0000021EB566E340>
│ └ {'type': 'http', 'asgi': {'version': '3.0'}, 'http_version': '1.1', 'method': 'PUT', 'headers': [(b'host', b'test'), (b'accep...
└ <function request_response.<locals>.app.<locals>.app at 0x0000021EB58B9620>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\starlette\routing.py", line 73, in app
response = await f(request)
│ └ <starlette.requests.Request object at 0x0000021EB57CED20>
└ <function get_request_handler.<locals>.app at 0x0000021EB54E1940>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\fastapi\routing.py", line 301, in app
raw_response = await run_endpoint_function(
└ <function run_endpoint_function at 0x0000021EB3E1F380>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\fastapi\routing.py", line 212, in run_endpoint_function
return await dependant.call(**values)
│ │ └ {'entity_service': <basic_memory.services.entity_service.EntityService object at 0x0000021EB57CF530>, 'search_service': <basi...
│ └ <function create_or_update_entity at 0x0000021EB53DA700>
└ Dependant(path_params=[ModelField(field_info=Path(PydanticUndefined), name='permalink', mode='validation')], query_params=[],...
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\basic_memory\api\routers\knowledge_router.py", line 86, in create_or_update_entity
entity, created = await entity_service.create_or_update_entity(data)
│ │ └ Entity(title='UTF-8 Character Encoding', content="# UTF-8 Character Encoding\n\nUTF-8 (Unicode Transformation Format 8-bit) i...
│ └ <function EntityService.create_or_update_entity at 0x0000021EB3F9CCC0>
└ <basic_memory.services.entity_service.EntityService object at 0x0000021EB57CF530>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\basic_memory\services\entity_service.py", line 99, in create_or_update_entity
return await self.create_entity(schema), True
│ │ └ Entity(title='UTF-8 Character Encoding', content="# UTF-8 Character Encoding\n\nUTF-8 (Unicode Transformation Format 8-bit) i...
│ └ <function EntityService.create_entity at 0x0000021EB3F9CD60>
└ <basic_memory.services.entity_service.EntityService object at 0x0000021EB57CF530>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\basic_memory\services\entity_service.py", line 121, in create_entity
checksum = await self.file_service.write_file(file_path, final_content)
│ │ │ │ └ "---\ntitle: UTF-8 Character Encoding\ntype: note\npermalink: utf-8-information/utf-8-character-encoding\ntags:\n- '#utf-8'\n...
│ │ │ └ WindowsPath('UTF-8 Information/UTF-8 Character Encoding.md')
│ │ └ <function FileService.write_file at 0x0000021EB3AD5940>
│ └ <basic_memory.services.file_service.FileService object at 0x0000021EB57CF200>
└ <basic_memory.services.entity_service.EntityService object at 0x0000021EB57CF530>
File "C:\Users\EMIR\AppData\Roaming\uv\tools\basic-memory\Lib\site-packages\basic_memory\services\file_service.py", line 150, in write_file
raise FileOperationError(f"Failed to write file: {e}")
└ <class 'basic_memory.services.exceptions.FileOperationError'>
basic_memory.services.exceptions.FileOperationError: Failed to write file: Failed to write file C:\Users\EMIR\basic-memory\UTF-8 Information\UTF-8 Character Encoding.md: 'charmap' codec can't encode character '\u2192' in position 1113: character maps to <undefined>
Activity
phernandez commentedon Mar 14, 2025
Hmm. can you give an example that causes the error? I'll try and create a test to reproduce locally
emiryasar commentedon Mar 15, 2025
Yo can try with a prompt,
"Create a note with contains utf8 characters"
I'm gettings errors like these,
Error executing tool write_note: Failed to write file: Failed to write file C:\Users\EMIR\basic-memory\UTF-8 Information\UTF-8 Characters.md: 'charmap' codec can't encode character '\u0410' in position 1054: character maps to
Error executing tool write_note: Failed to write file: Failed to write file C:\Users\EMIR\basic-memory\UTF-8 Information\UTF-8 Character Encoding.md: 'charmap' codec can't encode character '\u2192' in position 1113: character maps to
Logs
During handling of the above exception, another exception occurred:Traceback (most recent call last):
phernandez commentedon Mar 15, 2025
This issue has been fixed. You can run
uv tool update basic-memorylocally to get the updates. You should see:phernandez commentedon Mar 25, 2025
Hi @emiryasar FYI, the issue you reported with UTF-8 characters should be fixed now.
fix: schema_validate identifier resolution and text rendering
test(core): sweep the Unicode classes the relaxation guards rely on
fix(core): join words on the UAX basicmachines-co#29 MidLetter charac…
test(core): sweep the punctuation class the joining rule carves out of
fix(core): take the whole word-joining punctuation class, minus two f…