﻿{"id":3231,"date":"2016-05-23T11:01:29","date_gmt":"2016-05-23T10:01:29","guid":{"rendered":"http:\/\/www.sigterritoires.fr\/?p=3231"},"modified":"2023-04-28T14:58:53","modified_gmt":"2023-04-28T12:58:53","slug":"resoudre-les-problemes-dinstallation-de-photo2shape-qgis","status":"publish","type":"post","link":"https:\/\/www.sigterritoires.fr\/index.php\/resoudre-les-problemes-dinstallation-de-photo2shape-qgis\/","title":{"rendered":"R\u00e9soudre les probl\u00e8mes d&rsquo;installation de photo2shape (QGIS)"},"content":{"rendered":"<h4>Mise \u00e0 jour du 19 janvier 2017:<\/h4>\n<p><strong><span style=\"color: #0000ff;\">Cet article est obsol\u00e8te. Pour int\u00e9grer des photos g\u00e9olocalis\u00e9es dans QGis, r\u00e9f\u00e9rez-vous \u00e0 l&rsquo;article : <a style=\"color: #0000ff;\" href=\"http:\/\/wp.me\/p6XU0A-ZD\">Geotag and import photos remplace photo2shape dans QGis <\/a><\/span><\/strong><\/p>\n<p>Lors de l&rsquo;installation ou r\u00e9-installation du plugin photo2shape (mais aussi apr\u00e8s une d\u00e9sinstallation d&rsquo;autres plugins), vous pouvez vous retrouvez avec deux messages d&rsquo;erreur concernant ce plugin. Voici comment r\u00e9soudre ces probl\u00e8mes.<!--more--><\/p>\n<h2>Message \u00ab\u00a0No module named exifread\u00a0\u00bb<\/h2>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/p2s1.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3234\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/resoudre-les-problemes-dinstallation-de-photo2shape-qgis\/p2s1-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/p2s1.png?fit=939%2C394&amp;ssl=1\" data-orig-size=\"939,394\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"p2s1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/p2s1.png?fit=640%2C269&amp;ssl=1\" class=\"aligncenter size-full wp-image-3234\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/p2s1.png?resize=640%2C269\" alt=\"message d'erreur de phorto2shape &quot;No module named exifread&quot;\" width=\"640\" height=\"269\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/p2s1.png?w=939&amp;ssl=1 939w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/p2s1.png?resize=300%2C126&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/p2s1.png?resize=768%2C322&amp;ssl=1 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>Le plugin utilise un module Python qui n&rsquo;est pas pr\u00e9sent par d\u00e9faut dans l&rsquo;installation Python de QGis. Vous devez, <strong><span style=\"text-decoration: underline;\">AVANT<\/span><\/strong> d&rsquo;installer le plugin photo2shape, installer le module Python \u00ab\u00a0exifread\u00a0\u00bb. Voici la d\u00e9marche \u00e0 suivre:<\/p>\n<p>Pour avoir la derni\u00e8re version du module Python, allez \u00e0 la page d\u2019accueil du Repository Python:  , recherchez <em><strong>exifread<\/strong> <\/em>avec la fen\u00eatre de recherche et t\u00e9l\u00e9chargez la derni\u00e8re version disponible de <em><strong>exifread<\/strong> <\/em>en version source (et non en Python wheel).<\/p>\n<p>La premi\u00e8re celle du fichier t\u00e9l\u00e9charg\u00e9 nom.tar.gz pour retrouver un r\u00e9pertoire nom.tar<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py1.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2576\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/comment-installer-des-modules-complementaires-python-pour-arcgis-et-qgis\/py1\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py1.png?fit=796%2C541&amp;ssl=1\" data-orig-size=\"796,541\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"py1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py1.png?fit=630%2C428&amp;ssl=1\" class=\"aligncenter size-large wp-image-2576\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py1-630x428.png?resize=630%2C428\" alt=\"d\u00e9compression gz\" width=\"630\" height=\"428\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py1.png?resize=630%2C428&amp;ssl=1 630w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py1.png?resize=300%2C204&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py1.png?w=796&amp;ssl=1 796w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a><\/p>\n<p>Dans ce r\u00e9pertoire vous aurez un sous-r\u00e9pertoire <em><strong>dist<\/strong><\/em> et dans ce sous-r\u00e9pertoire un fichier compress\u00e9 <em><strong>.tar<\/strong><\/em><\/p>\n<p>La deuxi\u00e8me d\u00e9compression est celle de ce fichier .tar<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py2.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2577\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/comment-installer-des-modules-complementaires-python-pour-arcgis-et-qgis\/py2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py2.png?fit=978%2C590&amp;ssl=1\" data-orig-size=\"978,590\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"py2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py2.png?fit=630%2C380&amp;ssl=1\" class=\"aligncenter size-large wp-image-2577\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py2-630x380.png?resize=630%2C380\" alt=\"d\u00e9compression ;tar\" width=\"630\" height=\"380\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py2.png?resize=630%2C380&amp;ssl=1 630w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py2.png?resize=300%2C181&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py2.png?w=978&amp;ssl=1 978w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a>Maintenant il faut trouver le sous-r\u00e9pertoire contenant le module proprement dit.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py3.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2578\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/comment-installer-des-modules-complementaires-python-pour-arcgis-et-qgis\/py3-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py3.png?fit=844%2C392&amp;ssl=1\" data-orig-size=\"844,392\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"py3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py3.png?fit=630%2C293&amp;ssl=1\" class=\"aligncenter size-large wp-image-2578\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py3-630x293.png?resize=630%2C293\" alt=\"r\u00e9pertoire du module python\" width=\"630\" height=\"293\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py3.png?resize=630%2C293&amp;ssl=1 630w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py3.png?resize=300%2C139&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py3.png?w=844&amp;ssl=1 844w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a>Descendez l&rsquo;arborescence jusqu&rsquo;\u00e0 trouver un r\u00e9pertoire avec le nom du module<strong> SANS<\/strong> le num\u00e9ro de version. Il se trouve \u00e0 c\u00f4t\u00e9 d&rsquo;un autre r\u00e9pertoire finissant par <em><strong>egg-info.<\/strong><\/em><\/p>\n<p>C&rsquo;est ce r\u00e9pertoire qui contient le module Python et que vous devez copier dans votre installation Python de QGis.<\/p>\n<p>Pour que le module soit reconnu et utilis\u00e9, il faut le copier dans le r\u00e9pertoire <em><strong>Lib<\/strong><\/em> de l&rsquo;installation Python que vous utilisez.<\/p>\n<p>L\u2019installation Python connue par QGis se trouve dans le r\u00e9pertoire<br \/>\n<em><strong>C:\\Program Files\\QGIS xxxx\\apps\\Python27 (en 32 bits)<\/strong><\/em><br \/>\nou<br \/>\n<em><strong>C:\\Programmes\\QGIS xxxx\\apps\\Python27 (en 64 bits)<\/strong><\/em><\/p>\n<p>Dans ce r\u00e9pertoire vous trouverez le r\u00e9pertoire <strong>Lib<\/strong>. Copiez le module dans ce r\u00e9pertoire.<\/p>\n<p>Seulement <strong><span style=\"text-decoration: underline;\">APRES<\/span><\/strong> avoir suivi ces \u00e9tapes vous pourrez cliquer sur Installer l&rsquo;extension dans le gestionnaire des plugins de QGis.<\/p>\n<h2>Message \u00ab\u00a0global name &lsquo;translationPath&rsquo; is not defined\u00a0\u00bb<\/h2>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/p2s2.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3235\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/resoudre-les-problemes-dinstallation-de-photo2shape-qgis\/p2s2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/p2s2.png?fit=936%2C386&amp;ssl=1\" data-orig-size=\"936,386\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"p2s2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/p2s2.png?fit=640%2C264&amp;ssl=1\" class=\"aligncenter size-full wp-image-3235\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/p2s2.png?resize=640%2C264\" alt=\"message d'erreur de photo2shape global name 'translationPath' is not defined\" width=\"640\" height=\"264\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/p2s2.png?w=936&amp;ssl=1 936w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/p2s2.png?resize=300%2C124&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/p2s2.png?resize=768%2C317&amp;ssl=1 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Contrairement au message pr\u00e9c\u00e9dent, celui-ci vient d&rsquo;un erreur dans le code python du plugin. Pour le r\u00e9soudre, voici la d\u00e9marche \u00e0 suivre:<\/p>\n<p>Assurez vous que vous avez ferm\u00e9 QGis.<\/p>\n<p>T\u00e9l\u00e9chargez\u00a0 le plugin pour une installation manuelle \u00e0 partir de l&rsquo;adresse\u00a0https:\/\/plugins.qgis.org\/plugins\/photo2shape\/ <\/p>\n<p>Copiez le r\u00e9pertoire \u201cphoto2shape\u201d du t\u00e9l\u00e9chargement dans votre installation QGIS:<br \/>\n<em><strong>C:\\Users\\votre nom d&rsquo;utilisateur\\.qgis2\\python\\plugins\\photo2shape<\/strong><\/em><\/p>\n<p>Dans ce r\u00e9pertoire vous avez le fichier <em><strong>photo2shape_plugin.py<\/strong><\/em><br \/>\nOuvrez-le avec un \u00e9diteur de texte (NotePad en mode administrateur fait l\u2019affaire, comme on est dans le r\u00e9pertoire Programmes on ne peut pas faire n\u2019importe quoi\u2026)<br \/>\nCherchez les lignes suivantes:<br \/>\n<em><strong>if os.path.exists(qmPath):<\/strong><\/em><br \/>\n<em><strong> self.translator = QTranslator()<\/strong><\/em><br \/>\n<em><strong> self.translator.load(translationPath)<\/strong><\/em><br \/>\n<em><strong> QCoreApplication.installTranslator(self.translator )<\/strong><\/em><\/p>\n<p>Modifiez la ligne<br \/>\n<em><strong>self.translator.load(translationPath)<\/strong><\/em><br \/>\nen<br \/>\n<em><strong>self.translator.load(qmPath)<\/strong><\/em><\/p>\n<p>Enregistrez le fichier.<\/p>\n<p>N\u2019oubliez pas de cocher le plugin dans le gestionnaire de plugins de QGis pour activer le plugin.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mise \u00e0 jour du 19 janvier 2017: Cet article est obsol\u00e8te. Pour int\u00e9grer des photos g\u00e9olocalis\u00e9es dans QGis, r\u00e9f\u00e9rez-vous \u00e0 l&rsquo;article : Geotag and import photos remplace photo2shape dans QGis Lors de l&rsquo;installation ou r\u00e9-installation du&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"give_campaign_id":0,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[62],"tags":[325,280,279,58],"class_list":["post-3231","post","type-post","status-publish","format-standard","hentry","category-qgis-2","tag-erreur","tag-photo2shape","tag-plugin","tag-qgis"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p6XU0A-Q7","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/3231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/comments?post=3231"}],"version-history":[{"count":0,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/3231\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media?parent=3231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/categories?post=3231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/tags?post=3231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}