prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Installation issue
  Hello,
  I'm trying to install Geotrek following the documentation, and I have some problems.
  
  At the very beginnig, when I run the install.sh, the script can't find the `etc/setting.ini` file. I checked, and I have no `'etc'` folder at all... So the install aborted. 
  I tried to create myself this folder and the `settings.ini` file with the variable expected (dbhost, dbname etc...). It works (the database is installed), but the install crash few step later when it try to install the python environnement. `Could not setup python environment !`
  
  Did I miss something in the installation documentation ?
  How can I fix this problem ?
  
  Thanks for your help
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `geotrek/zoning/factories.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 import factory
  3 
  4 from django.conf import settings
  5 from django.contrib.gis.geos import Polygon, MultiPolygon
  6 
  7 from mapentity.helpers import bbox_split_srid_2154
  8 
  9 from geotrek.core.factories import TopologyFactory
  10 
  11 from . import models
  12 
  13 
  14 # Create 16 cities and 4 districts distinct same-area zone covering the spatial_extent and cycle on it
  15 geom_city_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=4, by_y=4, cycle=True)
  16 geom_district_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)
  17 geom_area_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)
  18 
  19 
  20 class CityFactory(factory.DjangoModelFactory):
  21     class Meta:
  22         model = models.City
  23 
  24     code = factory.Sequence(lambda n: u"#%s" % n)  # id (!) with max_length=6
  25     name = factory.Sequence(lambda n: u"City name %s" % n)
  26     geom = factory.Sequence(lambda _: MultiPolygon(Polygon.from_bbox(geom_city_iter.next()), srid=settings.SRID))
  27 
  28 
  29 class DistrictFactory(factory.DjangoModelFactory):
  30     class Meta:
  31         model = models.District
  32 
  33     name = factory.Sequence(lambda n: u"District name %s" % n)
  34     geom = factory.Sequence(lambda _: MultiPolygon(Polygon.from_bbox(geom_district_iter.next()), srid=settings.SRID))
  35 
  36 
  37 class RestrictedAreaTypeFactory(factory.DjangoModelFactory):
  38 
  39     class Meta:
  40         model = models.RestrictedAreaType
  41 
  42     name = factory.Sequence(lambda n: u"Restricted name %s" % n)
  43 
  44 
  45 class RestrictedAreaFactory(factory.DjangoModelFactory):
  46     class Meta:
  47         model = models.RestrictedArea
  48 
  49     name = factory.Sequence(lambda n: u"Restricted area name %s" % n)
  50     geom = factory.Sequence(lambda _: MultiPolygon(Polygon.from_bbox(geom_area_iter.next()), srid=settings.SRID))
  51     area_type = factory.SubFactory(RestrictedAreaTypeFactory)
  52 
  53 
  54 class RestrictedAreaEdgeFactory(TopologyFactory):
  55 
  56     class Meta:
  57         model = models.RestrictedAreaEdge
  58 
  59     restricted_area = factory.SubFactory(RestrictedAreaFactory)
  60 
  61 
  62 class CityEdgeFactory(TopologyFactory):
  63 
  64     class Meta:
  65         model = models.CityEdge
  66 
  67     city = factory.SubFactory(CityFactory)
  68 
  69 
  70 class DistrictEdgeFactory(TopologyFactory):
  71 
  72     class Meta:
  73         model = models.DistrictEdge
  74 
  75     district = factory.SubFactory(DistrictFactory)
  76
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/geotrek/zoning/factories.py b/geotrek/zoning/factories.py
  --- a/geotrek/zoning/factories.py
  +++ b/geotrek/zoning/factories.py
  @@ -11,10 +11,13 @@
   from . import models
   
   
  +# Don't intersect with geom from PathFactory
  +SPATIAL_EXTENT = (200000, 300000, 1100000, 1200000)
  +
   # Create 16 cities and 4 districts distinct same-area zone covering the spatial_extent and cycle on it
  -geom_city_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=4, by_y=4, cycle=True)
  -geom_district_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)
  -geom_area_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)
  +geom_city_iter = bbox_split_srid_2154(SPATIAL_EXTENT, by_x=4, by_y=4, cycle=True)
  +geom_district_iter = bbox_split_srid_2154(SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)
  +geom_area_iter = bbox_split_srid_2154(SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)
   
   
   class CityFactory(factory.DjangoModelFactory):
  
verification_info: {"golden_diff": "diff --git a/geotrek/zoning/factories.py b/geotrek/zoning/factories.py\n--- a/geotrek/zoning/factories.py\n+++ b/geotrek/zoning/factories.py\n@@ -11,10 +11,13 @@\n from . import models\n \n \n+# Don't intersect with geom from PathFactory\n+SPATIAL_EXTENT = (200000, 300000, 1100000, 1200000)\n+\n # Create 16 cities and 4 districts distinct same-area zone covering the spatial_extent and cycle on it\n-geom_city_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=4, by_y=4, cycle=True)\n-geom_district_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)\n-geom_area_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)\n+geom_city_iter = bbox_split_srid_2154(SPATIAL_EXTENT, by_x=4, by_y=4, cycle=True)\n+geom_district_iter = bbox_split_srid_2154(SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)\n+geom_area_iter = bbox_split_srid_2154(SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)\n \n \n class CityFactory(factory.DjangoModelFactory):\n", "issue": "Installation issue\nHello,\r\nI'm trying to install Geotrek following the documentation, and I have some problems.\r\n\r\nAt the very beginnig, when I run the install.sh, the script can't find the `etc/setting.ini` file. I checked, and I have no `'etc'` folder at all... So the install aborted. \r\nI tried to create myself this folder and the `settings.ini` file with the variable expected (dbhost, dbname etc...). It works (the database is installed), but the install crash few step later when it try to install the python environnement. `Could not setup python environment !`\r\n\r\nDid I miss something in the installation documentation ?\r\nHow can I fix this problem ?\r\n\r\nThanks for your help\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport factory\n\nfrom django.conf import settings\nfrom django.contrib.gis.geos import Polygon, MultiPolygon\n\nfrom mapentity.helpers import bbox_split_srid_2154\n\nfrom geotrek.core.factories import TopologyFactory\n\nfrom . import models\n\n\n# Create 16 cities and 4 districts distinct same-area zone covering the spatial_extent and cycle on it\ngeom_city_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=4, by_y=4, cycle=True)\ngeom_district_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)\ngeom_area_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)\n\n\nclass CityFactory(factory.DjangoModelFactory):\n    class Meta:\n        model = models.City\n\n    code = factory.Sequence(lambda n: u\"#%s\" % n)  # id (!) with max_length=6\n    name = factory.Sequence(lambda n: u\"City name %s\" % n)\n    geom = factory.Sequence(lambda _: MultiPolygon(Polygon.from_bbox(geom_city_iter.next()), srid=settings.SRID))\n\n\nclass DistrictFactory(factory.DjangoModelFactory):\n    class Meta:\n        model = models.District\n\n    name = factory.Sequence(lambda n: u\"District name %s\" % n)\n    geom = factory.Sequence(lambda _: MultiPolygon(Polygon.from_bbox(geom_district_iter.next()), srid=settings.SRID))\n\n\nclass RestrictedAreaTypeFactory(factory.DjangoModelFactory):\n\n    class Meta:\n        model = models.RestrictedAreaType\n\n    name = factory.Sequence(lambda n: u\"Restricted name %s\" % n)\n\n\nclass RestrictedAreaFactory(factory.DjangoModelFactory):\n    class Meta:\n        model = models.RestrictedArea\n\n    name = factory.Sequence(lambda n: u\"Restricted area name %s\" % n)\n    geom = factory.Sequence(lambda _: MultiPolygon(Polygon.from_bbox(geom_area_iter.next()), srid=settings.SRID))\n    area_type = factory.SubFactory(RestrictedAreaTypeFactory)\n\n\nclass RestrictedAreaEdgeFactory(TopologyFactory):\n\n    class Meta:\n        model = models.RestrictedAreaEdge\n\n    restricted_area = factory.SubFactory(RestrictedAreaFactory)\n\n\nclass CityEdgeFactory(TopologyFactory):\n\n    class Meta:\n        model = models.CityEdge\n\n    city = factory.SubFactory(CityFactory)\n\n\nclass DistrictEdgeFactory(TopologyFactory):\n\n    class Meta:\n        model = models.DistrictEdge\n\n    district = factory.SubFactory(DistrictFactory)\n", "path": "geotrek/zoning/factories.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nimport factory\n\nfrom django.conf import settings\nfrom django.contrib.gis.geos import Polygon, MultiPolygon\n\nfrom mapentity.helpers import bbox_split_srid_2154\n\nfrom geotrek.core.factories import TopologyFactory\n\nfrom . import models\n\n\n# Don't intersect with geom from PathFactory\nSPATIAL_EXTENT = (200000, 300000, 1100000, 1200000)\n\n# Create 16 cities and 4 districts distinct same-area zone covering the spatial_extent and cycle on it\ngeom_city_iter = bbox_split_srid_2154(SPATIAL_EXTENT, by_x=4, by_y=4, cycle=True)\ngeom_district_iter = bbox_split_srid_2154(SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)\ngeom_area_iter = bbox_split_srid_2154(SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)\n\n\nclass CityFactory(factory.DjangoModelFactory):\n    class Meta:\n        model = models.City\n\n    code = factory.Sequence(lambda n: u\"#%s\" % n)  # id (!) with max_length=6\n    name = factory.Sequence(lambda n: u\"City name %s\" % n)\n    geom = factory.Sequence(lambda _: MultiPolygon(Polygon.from_bbox(geom_city_iter.next()), srid=settings.SRID))\n\n\nclass DistrictFactory(factory.DjangoModelFactory):\n    class Meta:\n        model = models.District\n\n    name = factory.Sequence(lambda n: u\"District name %s\" % n)\n    geom = factory.Sequence(lambda _: MultiPolygon(Polygon.from_bbox(geom_district_iter.next()), srid=settings.SRID))\n\n\nclass RestrictedAreaTypeFactory(factory.DjangoModelFactory):\n\n    class Meta:\n        model = models.RestrictedAreaType\n\n    name = factory.Sequence(lambda n: u\"Restricted name %s\" % n)\n\n\nclass RestrictedAreaFactory(factory.DjangoModelFactory):\n    class Meta:\n        model = models.RestrictedArea\n\n    name = factory.Sequence(lambda n: u\"Restricted area name %s\" % n)\n    geom = factory.Sequence(lambda _: MultiPolygon(Polygon.from_bbox(geom_area_iter.next()), srid=settings.SRID))\n    area_type = factory.SubFactory(RestrictedAreaTypeFactory)\n\n\nclass RestrictedAreaEdgeFactory(TopologyFactory):\n\n    class Meta:\n        model = models.RestrictedAreaEdge\n\n    restricted_area = factory.SubFactory(RestrictedAreaFactory)\n\n\nclass CityEdgeFactory(TopologyFactory):\n\n    class Meta:\n        model = models.CityEdge\n\n    city = factory.SubFactory(CityFactory)\n\n\nclass DistrictEdgeFactory(TopologyFactory):\n\n    class Meta:\n        model = models.DistrictEdge\n\n    district = factory.SubFactory(DistrictFactory)\n", "path": "geotrek/zoning/factories.py"}]}