{"id":24851,"library":"xmind","title":"xmind","description":"XMind is a Python library for creating, parsing, and updating XMind mind map files. It supports XMind workbooks with topics, sheets, and relationships. Current version is 1.2.0, with an irregular release cadence. Requires Python 3.0 to 3.11 (not 3.12+). Note: This library is not actively maintained on PyPI; some features may be incomplete or buggy.","status":"active","version":"1.2.0","language":"python","source_language":"en","source_url":"https://github.com/zhuifengshen/xmind","tags":["xmind","mind-mapping","workbook"],"install":[{"cmd":"pip install xmind","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The library exports a single module 'xmind'. No subpackage imports needed.","symbol":"xmind","correct":"import xmind"}],"quickstart":{"code":"import xmind\n\n# Create a new workbook\nworkbook = xmind.Workbook()\nsheet = workbook.getPrimarySheet()\ntopic = sheet.getRootTopic()\ntopic.setTitle(\"Main Topic\")\n\n# Save to file\nworkbook.save(\"test.xmind\")\nprint(\"Saved as test.xmind\")\n\n# Load an existing workbook\nloaded = xmind.Workbook(\"test.xmind\")\nloaded_sheet = loaded.getPrimarySheet()\nloaded_topic = loaded_sheet.getRootTopic()\nprint(\"Root topic:\", loaded_topic.getTitle())","lang":"python","description":"Create a new XMind workbook, add a root topic, save to file, then reload and print the topic."},"warnings":[{"fix":"Use Python 3.10 or 3.11, or fork and fix the setup.py to support newer Python.","message":"The library does not support Python 3.12+ due to setup.py restrictions. Use Python 3.10 or 3.11.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Check if file exists before loading: 'from pathlib import Path; if Path('test.xmind').exists(): wb = xmind.Workbook('test.xmind'); else: wb = xmind.Workbook()'","message":"The Workbook constructor can either take a file path to load an existing file or no argument to create a new one. However, calling it with a path that does not exist will raise a FileNotFoundError, not create a new file.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use 'topic.setTitle(\"...\")' not 'topic.set_title(...)'.","message":"The method 'setTitle' is used instead of 'set_title' in some examples. There is no official 'set_title' method.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Ensure the directory exists before calling 'save'.","message":"Saving a workbook may not work correctly if the directory does not exist. The library does not create directories automatically.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install xmind' in your active Python environment.","cause":"Library not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'xmind'"},{"fix":"Do not pass a path to Workbook if you intend to create a new file. Use 'workbook = xmind.Workbook()' for new files.","cause":"Attempting to open a non-existent file with the Workbook constructor.","error":"FileNotFoundError: [Errno 2] No such file or directory: 'test.xmind'"},{"fix":"Ensure the workbook has a sheet with a root topic. Always check for None: 'if topic: print(topic.getTitle())'","cause":"Calling getTitle on a topic that is None. This can happen if the sheet has no root topic or if the path is incorrect.","error":"AttributeError: 'NoneType' object has no attribute 'getTitle'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}