{"id":356,"date":"2022-12-23T17:41:28","date_gmt":"2022-12-23T05:41:28","guid":{"rendered":"https:\/\/rayssite.ddns.net\/?p=356"},"modified":"2022-12-23T17:42:05","modified_gmt":"2022-12-23T05:42:05","slug":"troubleshooting-a-failed-import-in-a-pyinstaller-build","status":"publish","type":"post","link":"https:\/\/rayssite.ddns.net\/index.php\/2022\/12\/23\/troubleshooting-a-failed-import-in-a-pyinstaller-build\/","title":{"rendered":"Troubleshooting a Failed Import in a Pyinstaller Build"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/rayssite.ddns.net\/index.php\/2022\/12\/23\/troubleshooting-a-failed-import-in-a-pyinstaller-build\/#Introduction\" >Introduction<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/rayssite.ddns.net\/index.php\/2022\/12\/23\/troubleshooting-a-failed-import-in-a-pyinstaller-build\/#The_Problem\" >The Problem<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/rayssite.ddns.net\/index.php\/2022\/12\/23\/troubleshooting-a-failed-import-in-a-pyinstaller-build\/#My_Setup\" >My Setup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/rayssite.ddns.net\/index.php\/2022\/12\/23\/troubleshooting-a-failed-import-in-a-pyinstaller-build\/#Troubleshooting\" >Troubleshooting<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/rayssite.ddns.net\/index.php\/2022\/12\/23\/troubleshooting-a-failed-import-in-a-pyinstaller-build\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Introduction\"><\/span>Introduction<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In late 2020 &#8211; early 2021 I wrote an inventory system in Python for the Formula SAE team I was in (<a href=\"https:\/\/github.com\/Ray457\/Electrons-Inventory\">GitHub link to the project<\/a>). To make distribution easier, I used <a rel=\"noreferrer noopener\" href=\"https:\/\/pypi.org\/project\/pyinstaller\/\" target=\"_blank\">Pyinstaller<\/a> to compile the Python program into a binary executable for Windows. The setup worked on several different PCs that don&#8217;t have Python environments and I never heard anyone having problems opening it. One day, it won&#8217;t work on a newly installed Windows 10 computer that I set up in the workshop. This post documents the steps I took to troubleshoot the problem and the resolution.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_Problem\"><\/span>The Problem<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>When the compiled executable is run on the newly set up PC, an import error gets raised:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Traceback (most recent call last):\n  File \"PyInstaller\\loader\\pyimod04_ctypes.py\", line 53, in __init__\n  File \"ctypes\\__init__.py\", line 348, in __init__\nOSError: &#91;WinError 126] The specified module could not be found\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"pylibdmtx\\dmtx_library.py\", line 38, in load\n  File \"ctypes\\__init__.py\", line 426, in LoadLibrary\n  File \"PyInstaller\\loader\\pyimod04_ctypes.py\", line 55, in __init__\npyimod04_ctypes.PyInstallerImportError: Failed to load dynlib\/dll 'libdmtx-64.dll'. Most likely this dynlib\/dll was not found when the application was frozen.\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"PyInstaller\\loader\\pyimod04_ctypes.py\", line 53, in __init__\n  File \"ctypes\\__init__.py\", line 348, in __init__\nOSError: &#91;WinError 126] The specified module could not be found\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"Electrons_inventory.py\", line 9, in &lt;module&gt;\n  File \"&lt;frozen importlib._bootstrap&gt;\", line 971, in _find_and_load\n  File \"&lt;frozen importlib._bootstrap&gt;\", line 955, in _find_and_load_unlocked\n  File \"&lt;frozen importlib._bootstrap&gt;\", line 665, in _load_unlocked\n  File \"PyInstaller\\loader\\pyimod03_importers.py\", line 495, in exec_module\n  File \"pylibdmtx\\pylibdmtx.py\", line 10, in &lt;module&gt;\n  File \"&lt;frozen importlib._bootstrap&gt;\", line 971, in _find_and_load\n  File \"&lt;frozen importlib._bootstrap&gt;\", line 955, in _find_and_load_unlocked\n  File \"&lt;frozen importlib._bootstrap&gt;\", line 665, in _load_unlocked\n  File \"PyInstaller\\loader\\pyimod03_importers.py\", line 495, in exec_module\n  File \"pylibdmtx\\wrapper.py\", line 70, in &lt;module&gt;\n  File \"pylibdmtx\\wrapper.py\", line 58, in libdmtx_function\n  File \"pylibdmtx\\wrapper.py\", line 39, in load_libdmtx\n  File \"pylibdmtx\\dmtx_library.py\", line 41, in load\n  File \"ctypes\\__init__.py\", line 426, in LoadLibrary\n  File \"PyInstaller\\loader\\pyimod04_ctypes.py\", line 55, in __init__\npyimod04_ctypes.PyInstallerImportError: Failed to load dynlib\/dll 'C:\\\\Users\\\\rclab\\\\Desktop\\\\Electrons_inventory\\\\libdmtx-64.dll'. Most likely this dynlib\/dll was not found when the application was frozen.\n&#91;5272] Failed to execute script 'Electrons_inventory' due to unhandled exception!<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"My_Setup\"><\/span>My Setup<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>When I first used Pyinstaller to compile Python programs, I used the <a rel=\"noreferrer noopener\" href=\"https:\/\/pypi.org\/project\/auto-py-to-exe\/\" target=\"_blank\">auto-py-to-exe<\/a> GUI tool to generate the Pyinstaller command and the corresponding arguments. The originally generated command was this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pyinstaller --noconfirm --onedir --console --icon \"J:\/Documents\/OneDrive\/project files\/FSAE\/2021\/Inventory_GitHub\/Electrons-Inventory\/inventory_app\/favicon.ico\" --paths \"J:\/Documents\/OneDrive\/project files\/FSAE\/2020\/Inventory\/2020_inventory\/venv\/Lib\/site-packages\" --add-data \"J:\/Documents\/OneDrive\/project files\/FSAE\/2020\/Inventory\/2020_inventory\/inventory_app\/favicon.ico;.\" --add-data \"J:\/Documents\/OneDrive\/project files\/FSAE\/2020\/Inventory\/2020_inventory\/inventory_app\/magnifying-glass.png;.\" --add-data \"J:\/Documents\/OneDrive\/project files\/FSAE\/2020\/Inventory\/2020_inventory\/inventory_app\/server.pem;.\" --add-data \"J:\/Documents\/OneDrive\/project files\/FSAE\/2020\/Inventory\/2020_inventory\/inventory_app\/storage.png;.\" --add-data \"J:\/Documents\/OneDrive\/project files\/FSAE\/2020\/Inventory\/2020_inventory\/inventory_app\/takeaway.png;.\" --add-binary \"J:\/Documents\/OneDrive\/project files\/FSAE\/2020\/Inventory\/2020_inventory\/venv\/Lib\/site-packages\/pylibdmtx\/libdmtx-64.dll;.\"  \"J:\/Documents\/OneDrive\/project files\/FSAE\/2021\/Inventory_GitHub\/Electrons-Inventory\/inventory_app\/Electrons_inventory.py\"<\/code><\/pre>\n\n\n\n<p>Looks like the auto-py-to-exe tool used absolute paths by default which is not ideal. I later manually tweaked the command to make it work with relative paths. I&#8217;ll include a working command at the end of this post with relative paths.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Troubleshooting\"><\/span>Troubleshooting<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The first step of troubleshooting was to reproduce the problem elsewhere so I could more easily find out what was wrong in my own time. The exact same binary for the inventory system has been working fine before on other computers and when I tested with some PCs I have access to, it also worked. I then tried setting up a virtual machine on my PC and installed Windows 10 again using the same media. The problem showed up again!<\/p>\n\n\n\n<p>The error messages seem to indicate the library <strong>libdmtx-64.dll<\/strong> wasn&#8217;t there during the compiling process. It&#8217;s part of the library <a rel=\"noreferrer noopener\" href=\"https:\/\/pypi.org\/project\/pylibdmtx\/\" target=\"_blank\">libdmtx<\/a> for reading data matrix codes from images, used in the inventory project to scan the codes on DigiKey bags. Therefore, I couldn&#8217;t just remove the module, recompile and see if the program starts up, at least not easily.<\/p>\n\n\n\n<p>I double-checked my build setup to confirm that the file was, indeed there during the build, so something else is probably causing this issue.<\/p>\n\n\n\n<p>Next, I checked the Pyinstaller <a rel=\"noreferrer noopener\" href=\"https:\/\/pyinstaller.org\/en\/stable\/when-things-go-wrong.html\" target=\"_blank\">documentation<\/a> for any hints that might indicate what was wrong. I noticed that I could add build flags that add debug outputs during program startup, so I added the <code>--debug=all<\/code> flag to the end of the build command. Here&#8217;s the output: (only showing relevant sections)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...\nimport 'pylibdmtx.dmtx_library' # &lt;_frozen_importlib_external.SourcelessFileLoader object at 0x000001ADBF57C240&gt;\nTraceback (most recent call last):\n  File \"PyInstaller\\loader\\pyimod04_ctypes.py\", line 53, in __init__\n  File \"c:\\users\\ray\\appdata\\local\\programs\\python\\python36\\lib\\ctypes\\__init__.py\", line 348, in __init__\nOSError: &#91;WinError 126] The specified module could not be found\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"J:\\Documents\\OneDrive\\project files\\FSAE\\2020\\Inventory\\2020_inventory\\venv\\Lib\\site-packages\\pylibdmtx\\dmtx_library.py\", line 38, in load\n  File \"c:\\users\\ray\\appdata\\local\\programs\\python\\python36\\lib\\ctypes\\__init__.py\", line 426, in LoadLibrary\n  File \"PyInstaller\\loader\\pyimod04_ctypes.py\", line 55, in __init__\npyimod04_ctypes.PyInstallerImportError: Failed to load dynlib\/dll 'libdmtx-64.dll'. Most likely this dynlib\/dll was not found when the application was frozen.\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"PyInstaller\\loader\\pyimod04_ctypes.py\", line 53, in __init__\n  File \"c:\\users\\ray\\appdata\\local\\programs\\python\\python36\\lib\\ctypes\\__init__.py\", line 348, in __init__\nOSError: &#91;WinError 126] The specified module could not be found\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"Electrons_inventory.py\", line 9, in &lt;module&gt;\n  File \"&lt;frozen importlib._bootstrap&gt;\", line 971, in _find_and_load\n  File \"&lt;frozen importlib._bootstrap&gt;\", line 955, in _find_and_load_unlocked\n  File \"&lt;frozen importlib._bootstrap&gt;\", line 665, in _load_unlocked\n  File \"&lt;frozen importlib._bootstrap_external&gt;\", line 678, in exec_module\n  File \"&lt;frozen importlib._bootstrap&gt;\", line 219, in _call_with_frames_removed\n  File \"J:\\Documents\\OneDrive\\project files\\FSAE\\2020\\Inventory\\2020_inventory\\venv\\Lib\\site-packages\\pylibdmtx\\pylibdmtx.py\", line 10, in &lt;module&gt;\n  File \"&lt;frozen importlib._bootstrap&gt;\", line 971, in _find_and_load\n  File \"&lt;frozen importlib._bootstrap&gt;\", line 955, in _find_and_load_unlocked\n  File \"&lt;frozen importlib._bootstrap&gt;\", line 665, in _load_unlocked\n  File \"&lt;frozen importlib._bootstrap_external&gt;\", line 678, in exec_module\n  File \"&lt;frozen importlib._bootstrap&gt;\", line 219, in _call_with_frames_removed\n  File \"J:\\Documents\\OneDrive\\project files\\FSAE\\2020\\Inventory\\2020_inventory\\venv\\Lib\\site-packages\\pylibdmtx\\wrapper.py\", line 70, in &lt;module&gt;\n  File \"J:\\Documents\\OneDrive\\project files\\FSAE\\2020\\Inventory\\2020_inventory\\venv\\Lib\\site-packages\\pylibdmtx\\wrapper.py\", line 58, in libdmtx_function\n  File \"J:\\Documents\\OneDrive\\project files\\FSAE\\2020\\Inventory\\2020_inventory\\venv\\Lib\\site-packages\\pylibdmtx\\wrapper.py\", line 39, in load_libdmtx\n  File \"J:\\Documents\\OneDrive\\project files\\FSAE\\2020\\Inventory\\2020_inventory\\venv\\Lib\\site-packages\\pylibdmtx\\dmtx_library.py\", line 41, in load\n  File \"c:\\users\\ray\\appdata\\local\\programs\\python\\python36\\lib\\ctypes\\__init__.py\", line 426, in LoadLibrary\n  File \"PyInstaller\\loader\\pyimod04_ctypes.py\", line 55, in __init__\npyimod04_ctypes.PyInstallerImportError: Failed to load dynlib\/dll 'C:\\\\Users\\\\rclab\\\\AppData\\\\Local\\\\Temp\\\\_MEI11122\\\\pylibdmtx\\\\libdmtx-64.dll'. Most likely this dynlib\/dll was not found when the application was frozen.\n&#91;3228] Failed to execute script 'Electrons_inventory' due to unhandled exception!\n&#91;3228] LOADER: OK.\n&#91;3228] LOADER: Manually flushing stdout and stderr\n&#91;3228] LOADER: Cleaning up Python interpreter.\n# clear builtins._\n...<\/code><\/pre>\n\n\n\n<p>As shown above, it didn&#8217;t really offer any additional information.<\/p>\n\n\n\n<p>I then did some experimentation (starting with only the main executable file and adding DLLs until the same error appeared) to see how the error messages change. I noticed that the error message wasn&#8217;t always accurate at indicating where the root problem was. For example, if <code>VCRUNTIME140.dll<\/code> was missing, the program loader would throw an error while loading the <code>python36.dll<\/code> (&#8220;LoadLibrary: the specified module could not be found&#8221;).<\/p>\n\n\n\n<p>I also tried shuffling around the import order at the beginning of the python file &#8211; the other packages (<code>cv2<\/code> and <code>numpy<\/code>) still imported as expected, so it was unlikely a problem with the <code>ctypes<\/code> package itself, even though it threw the error during program loading.<\/p>\n\n\n\n<p>I then tried Googling the OSError itself, which led me to <a rel=\"noreferrer noopener\" href=\"https:\/\/stackoverflow.com\/questions\/54870595\/oserror-winerror-126-module-could-not-be-found\" target=\"_blank\">this StackOverflow question<\/a>, and the cause of the op&#8217;s problem was due to dependencies of the offending DLL not being met. The op used a tool from Visual Studio (<code>dumpbin<\/code>), but I didn&#8217;t have a VS installation. With some more searching, I came across the <a rel=\"noreferrer noopener\" href=\"https:\/\/www.dependencywalker.com\/\" target=\"_blank\">Dependency Walker<\/a> tool and gave it a shot in the VM:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"736\" height=\"925\" data-src=\"https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2022\/12\/dependency-walker-output.png\" alt=\"\" class=\"wp-image-377 lazyload\" data-srcset=\"https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2022\/12\/dependency-walker-output.png 736w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2022\/12\/dependency-walker-output-239x300.png 239w\" data-sizes=\"(max-width: 736px) 100vw, 736px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 736px; --smush-placeholder-aspect-ratio: 736\/925;\" \/><figcaption>Output from the Dependency Walker in the test VM<\/figcaption><\/figure>\n\n\n\n<p>As shown in the above image, the dependency walker couldn&#8217;t find a long list of DLLs which doesn&#8217;t look quite right for a simple library. I also ran the tool on a working PC with similar results, leading me to think that it may not be working correctly.<\/p>\n\n\n\n<p>With a bit more searching, I came to <a rel=\"noreferrer noopener\" href=\"https:\/\/stackoverflow.com\/questions\/7378959\/how-to-check-for-dll-dependency\" target=\"_blank\">this SO question<\/a>, which suggested running <code>ldd<\/code> in a git bash window. I have that! I then ran it on a working machine as I didn&#8217;t have git installed in the VM:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ ldd libdmtx-64.dll\n        ntdll.dll =&gt; \/c\/WINDOWS\/SYSTEM32\/ntdll.dll (0x7ff8d9eb0000)\n        KERNEL32.DLL =&gt; \/c\/WINDOWS\/System32\/KERNEL32.DLL (0x7ff8d9630000)\n        KERNELBASE.dll =&gt; \/c\/WINDOWS\/System32\/KERNELBASE.dll (0x7ff8d78b0000)\n        MSVCR120.dll =&gt; \/c\/WINDOWS\/SYSTEM32\/MSVCR120.dll (0x7ff8a8b00000)<\/code><\/pre>\n\n\n\n<p>In the above output, the first three dependencies look like Windows system files, while the fourth looks like a Visual C\/C++ Runtime library, which probably won&#8217;t come with Windows installations by default. I then checked whether this file was in my release folder structure, and it wasn&#8217;t! After copying it to the same directory in the VM, the app started up normally \ud83d\ude00<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In summary, the problem was due to the missing dependency of the libdmtx DLL, which didn&#8217;t get picked up by the pyinstaller. It can be fixed by adding an <code>--add-binary<\/code> argument pointing to the <code>msvcr120.dll<\/code> file. The final pyinstaller command looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pyinstaller --noconfirm --onedir --console --icon \"favicon.ico\" --paths \"J:\/Documents\/OneDrive\/project files\/FSAE\/2020\/Inventory\/2020_inventory\/venv\/Lib\/site-packages\" --add-data \"favicon.ico;.\" --add-data \"magnifying-glass.png;.\" --add-data \"server.pem;.\" --add-data \"storage.png;.\" --add-data \"takeaway.png;.\" --add-binary \"C:\/Windows\/System32\/msvcr120.dll;.\"  \"Electrons_inventory.py\"<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In late 2020 &#8211; early 2021 I wrote an inventory system in Python for the Formula SAE team I was in (GitHub link to the project). To make distribution easier, I used Pyinstaller to compile the Python program into a binary executable for Windows. The setup worked on several different PCs that don&#8217;t have&hellip; <a class=\"more-link\" href=\"https:\/\/rayssite.ddns.net\/index.php\/2022\/12\/23\/troubleshooting-a-failed-import-in-a-pyinstaller-build\/\">Continue reading <span class=\"screen-reader-text\">Troubleshooting a Failed Import in a Pyinstaller Build<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[30,29,28],"class_list":["post-356","post","type-post","status-publish","format-standard","hentry","category-troubleshooting","tag-libdmtx","tag-pyinstaller","tag-python","entry"],"_links":{"self":[{"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/comments?post=356"}],"version-history":[{"count":15,"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/356\/revisions"}],"predecessor-version":[{"id":382,"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/356\/revisions\/382"}],"wp:attachment":[{"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/media?parent=356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/categories?post=356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/tags?post=356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}