We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
plotting.geo convert_gis_to_geodata leads to issue if run after convert_geodata_to_gis
```python
import pandapower.plotting.geo as geo
import pandapower.networks as pn

net = pn.mv_oberrhein()

geo.convert_geodata_to_gis(net)
geo.convert_gis_to_geodata(net)
```

results in `AttributeError: 'Series' object has no attribute 'geometry'`

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pandapower/plotting/geo.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 
3 # Copyright (c) 2016-2022 by University of Kassel and Fraunhofer Institute for Energy Economics
4 # and Energy System Technology (IEE), Kassel. All rights reserved.
5 
6 import sys
7 from numpy import array, setdiff1d
8 
9 from pandapower.auxiliary import soft_dependency_error
10 
11 try:
12     from shapely.geometry import Point, LineString
13     shapely_INSTALLED = True
14 except ImportError:
15     shapely_INSTALLED = False
16 
17 try:
18     from geopandas import GeoDataFrame, GeoSeries
19     geopandas_INSTALLED = True
20 except ImportError:
21     geopandas_INSTALLED = False
22 
23 try:
24     from pyproj import Proj, transform
25     pyproj_INSTALLED = True
26 except ImportError:
27     pyproj_INSTALLED = False
28 
29 
30 def _node_geometries_from_geodata(node_geo, epsg=31467):
31     """
32     Creates a geopandas geodataframe from a given dataframe of with node coordinates as x and y
33     values.
34 
35     :param node_geo: The dataframe containing the node coordinates (x and y values)
36     :type node_geo: pandas.dataframe
37     :param epsg: The epsg projection of the node coordinates
38     :type epsg: int, default 31467 (= Gauss-Krüger Zone 3)
39     :return: node_geodata - a geodataframe containing the node_geo and Points in the geometry column
40     """
41     missing_packages = array(["shapely", "geopandas"])[~array([
42         shapely_INSTALLED, geopandas_INSTALLED])]
43     if len(missing_packages):
44         soft_dependency_error(str(sys._getframe().f_code.co_name)+"()", missing_packages)
45     geoms = [Point(x, y) for x, y in node_geo[["x", "y"]].values]
46     return GeoDataFrame(node_geo, crs=f"epsg:{epsg}", geometry=geoms, index=node_geo.index)
47 
48 
49 def _branch_geometries_from_geodata(branch_geo, epsg=31467):
50     missing_packages = array(["shapely", "geopandas"])[~array([
51         shapely_INSTALLED, geopandas_INSTALLED])]
52     if len(missing_packages):
53         soft_dependency_error(str(sys._getframe().f_code.co_name)+"()", missing_packages)
54     geoms = GeoSeries([LineString(x) for x in branch_geo.coords.values], index=branch_geo.index,
55                       crs=f"epsg:{epsg}")
56     return GeoDataFrame(branch_geo, crs=f"epsg:{epsg}", geometry=geoms, index=branch_geo.index)
57 
58 
59 def _transform_node_geometry_to_geodata(node_geo):
60     """
61     Create x and y values from geodataframe
62 
63     :param node_geo: The dataframe containing the node geometries (as shapely points)
64     :type node_geo: geopandas.GeoDataFrame
65     :return: bus_geo - The given geodataframe with x and y values
66     """
67     node_geo["x"] = [p.x for p in node_geo.geometry]
68     node_geo["y"] = [p.y for p in node_geo.geometry]
69     return node_geo
70 
71 
72 def _transform_branch_geometry_to_coords(branch_geo):
73     """
74     Create coords entries from geodataframe geometries
75 
76     :param branch_geo: The dataframe containing the branch geometries (as shapely LineStrings)
77     :type branch_geo: geopandas.GeoDataFrame
78     :return: branch_geo - The given geodataframe with coords
79     """
80     branch_geo["coords"] = branch_geo["coords"].geometry.apply(lambda x: list(x.coords))
81     return branch_geo
82 
83 
84 def _convert_xy_epsg(x, y, epsg_in=4326, epsg_out=31467):
85     """
86     Converts the given x and y coordinates according to the defined epsg projections.
87 
88     :param x: x-values of coordinates
89     :type x: iterable
90     :param y: y-values of coordinates
91     :type y: iterable
92     :param epsg_in: current epsg projection
93     :type epsg_in: int, default 4326 (= WGS84)
94     :param epsg_out: epsg projection to be transformed to
95     :type epsg_out: int, default 31467 (= Gauss-Krüger Zone 3)
96     :return: transformed_coords - x and y values in new coordinate system
97     """
98     if not pyproj_INSTALLED:
99         soft_dependency_error(str(sys._getframe().f_code.co_name)+"()", "pyproj")
100     in_proj = Proj(init='epsg:%i' % epsg_in)
101     out_proj = Proj(init='epsg:%i' % epsg_out)
102     return transform(in_proj, out_proj, x, y)
103 
104 
105 def convert_gis_to_geodata(net, node_geodata=True, branch_geodata=True):
106     """
107     Extracts information on bus and line geodata from the geometries of a geopandas geodataframe.
108 
109     :param net: The net for which to convert the geodata
110     :type net: pandapowerNet
111     :param node_geodata: flag if to extract x and y values for bus geodata
112     :type node_geodata: bool, default True
113     :param branch_geodata: flag if to extract coordinates values for line geodata
114     :type branch_geodata: bool, default True
115     :return: No output.
116     """
117     if node_geodata:
118         _transform_node_geometry_to_geodata(net.bus_geodata)
119     if branch_geodata:
120         _transform_branch_geometry_to_coords(net.line_geodata)
121 
122 
123 def convert_geodata_to_gis(net, epsg=31467, node_geodata=True, branch_geodata=True):
124     """
125     Transforms the bus and line geodata of a net into a geopandaas geodataframe with the respective
126     geometries.
127 
128     :param net: The net for which to convert the geodata
129     :type net: pandapowerNet
130     :param epsg: current epsg projection
131     :type epsg: int, default 4326 (= WGS84)
132     :param node_geodata: flag if to transform the bus geodata table
133     :type node_geodata: bool, default True
134     :param branch_geodata: flag if to transform the line geodata table
135     :type branch_geodata: bool, default True
136     :return: No output.
137     """
138     if node_geodata:
139         net["bus_geodata"] = _node_geometries_from_geodata(net["bus_geodata"], epsg)
140     if branch_geodata:
141         net["line_geodata"] = _branch_geometries_from_geodata(net["line_geodata"], epsg)
142     net["gis_epsg_code"] = epsg
143 
144 
145 def convert_epsg_bus_geodata(net, epsg_in=4326, epsg_out=31467):
146     """
147     Converts bus geodata in net from epsg_in to epsg_out
148 
149     :param net: The pandapower network
150     :type net: pandapowerNet
151     :param epsg_in: current epsg projection
152     :type epsg_in: int, default 4326 (= WGS84)
153     :param epsg_out: epsg projection to be transformed to
154     :type epsg_out: int, default 31467 (= Gauss-Krüger Zone 3)
155     :return: net - the given pandapower network (no copy!)
156     """
157     net['bus_geodata'].loc[:, "x"], net['bus_geodata'].loc[:, "y"] = _convert_xy_epsg(
158         net['bus_geodata'].loc[:, "x"], net['bus_geodata'].loc[:, "y"], epsg_in, epsg_out)
159     return net
160
```
--- 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()

```

diff --git a/pandapower/plotting/geo.py b/pandapower/plotting/geo.py
--- a/pandapower/plotting/geo.py
+++ b/pandapower/plotting/geo.py
@@ -77,7 +77,7 @@
     :type branch_geo: geopandas.GeoDataFrame
     :return: branch_geo - The given geodataframe with coords
     """
-    branch_geo["coords"] = branch_geo["coords"].geometry.apply(lambda x: list(x.coords))
+    branch_geo["coords"] = branch_geo.geometry.apply(lambda x: list(x.coords))
     return branch_geo

{"golden_diff": "diff --git a/pandapower/plotting/geo.py b/pandapower/plotting/geo.py\n--- a/pandapower/plotting/geo.py\n+++ b/pandapower/plotting/geo.py\n@@ -77,7 +77,7 @@\n     :type branch_geo: geopandas.GeoDataFrame\n     :return: branch_geo - The given geodataframe with coords\n     \"\"\"\n-    branch_geo[\"coords\"] = branch_geo[\"coords\"].geometry.apply(lambda x: list(x.coords))\n+    branch_geo[\"coords\"] = branch_geo.geometry.apply(lambda x: list(x.coords))\n     return branch_geo\n", "issue": "plotting.geo convert_gis_to_geodata leads to issue if run after convert_geodata_to_gis\n```python\r\nimport pandapower.plotting.geo as geo\r\nimport pandapower.networks as pn\r\n\r\nnet = pn.mv_oberrhein()\r\n\r\ngeo.convert_geodata_to_gis(net)\r\ngeo.convert_gis_to_geodata(net)\r\n```\r\n\r\nresults in `AttributeError: 'Series' object has no attribute 'geometry'`\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2022 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\nimport sys\nfrom numpy import array, setdiff1d\n\nfrom pandapower.auxiliary import soft_dependency_error\n\ntry:\n    from shapely.geometry import Point, LineString\n    shapely_INSTALLED = True\nexcept ImportError:\n    shapely_INSTALLED = False\n\ntry:\n    from geopandas import GeoDataFrame, GeoSeries\n    geopandas_INSTALLED = True\nexcept ImportError:\n    geopandas_INSTALLED = False\n\ntry:\n    from pyproj import Proj, transform\n    pyproj_INSTALLED = True\nexcept ImportError:\n    pyproj_INSTALLED = False\n\n\ndef _node_geometries_from_geodata(node_geo, epsg=31467):\n    \"\"\"\n    Creates a geopandas geodataframe from a given dataframe of with node coordinates as x and y\n    values.\n\n    :param node_geo: The dataframe containing the node coordinates (x and y values)\n    :type node_geo: pandas.dataframe\n    :param epsg: The epsg projection of the node coordinates\n    :type epsg: int, default 31467 (= Gauss-Kr\u00fcger Zone 3)\n    :return: node_geodata - a geodataframe containing the node_geo and Points in the geometry column\n    \"\"\"\n    missing_packages = array([\"shapely\", \"geopandas\"])[~array([\n        shapely_INSTALLED, geopandas_INSTALLED])]\n    if len(missing_packages):\n        soft_dependency_error(str(sys._getframe().f_code.co_name)+\"()\", missing_packages)\n    geoms = [Point(x, y) for x, y in node_geo[[\"x\", \"y\"]].values]\n    return GeoDataFrame(node_geo, crs=f\"epsg:{epsg}\", geometry=geoms, index=node_geo.index)\n\n\ndef _branch_geometries_from_geodata(branch_geo, epsg=31467):\n    missing_packages = array([\"shapely\", \"geopandas\"])[~array([\n        shapely_INSTALLED, geopandas_INSTALLED])]\n    if len(missing_packages):\n        soft_dependency_error(str(sys._getframe().f_code.co_name)+\"()\", missing_packages)\n    geoms = GeoSeries([LineString(x) for x in branch_geo.coords.values], index=branch_geo.index,\n                      crs=f\"epsg:{epsg}\")\n    return GeoDataFrame(branch_geo, crs=f\"epsg:{epsg}\", geometry=geoms, index=branch_geo.index)\n\n\ndef _transform_node_geometry_to_geodata(node_geo):\n    \"\"\"\n    Create x and y values from geodataframe\n\n    :param node_geo: The dataframe containing the node geometries (as shapely points)\n    :type node_geo: geopandas.GeoDataFrame\n    :return: bus_geo - The given geodataframe with x and y values\n    \"\"\"\n    node_geo[\"x\"] = [p.x for p in node_geo.geometry]\n    node_geo[\"y\"] = [p.y for p in node_geo.geometry]\n    return node_geo\n\n\ndef _transform_branch_geometry_to_coords(branch_geo):\n    \"\"\"\n    Create coords entries from geodataframe geometries\n\n    :param branch_geo: The dataframe containing the branch geometries (as shapely LineStrings)\n    :type branch_geo: geopandas.GeoDataFrame\n    :return: branch_geo - The given geodataframe with coords\n    \"\"\"\n    branch_geo[\"coords\"] = branch_geo[\"coords\"].geometry.apply(lambda x: list(x.coords))\n    return branch_geo\n\n\ndef _convert_xy_epsg(x, y, epsg_in=4326, epsg_out=31467):\n    \"\"\"\n    Converts the given x and y coordinates according to the defined epsg projections.\n\n    :param x: x-values of coordinates\n    :type x: iterable\n    :param y: y-values of coordinates\n    :type y: iterable\n    :param epsg_in: current epsg projection\n    :type epsg_in: int, default 4326 (= WGS84)\n    :param epsg_out: epsg projection to be transformed to\n    :type epsg_out: int, default 31467 (= Gauss-Kr\u00fcger Zone 3)\n    :return: transformed_coords - x and y values in new coordinate system\n    \"\"\"\n    if not pyproj_INSTALLED:\n        soft_dependency_error(str(sys._getframe().f_code.co_name)+\"()\", \"pyproj\")\n    in_proj = Proj(init='epsg:%i' % epsg_in)\n    out_proj = Proj(init='epsg:%i' % epsg_out)\n    return transform(in_proj, out_proj, x, y)\n\n\ndef convert_gis_to_geodata(net, node_geodata=True, branch_geodata=True):\n    \"\"\"\n    Extracts information on bus and line geodata from the geometries of a geopandas geodataframe.\n\n    :param net: The net for which to convert the geodata\n    :type net: pandapowerNet\n    :param node_geodata: flag if to extract x and y values for bus geodata\n    :type node_geodata: bool, default True\n    :param branch_geodata: flag if to extract coordinates values for line geodata\n    :type branch_geodata: bool, default True\n    :return: No output.\n    \"\"\"\n    if node_geodata:\n        _transform_node_geometry_to_geodata(net.bus_geodata)\n    if branch_geodata:\n        _transform_branch_geometry_to_coords(net.line_geodata)\n\n\ndef convert_geodata_to_gis(net, epsg=31467, node_geodata=True, branch_geodata=True):\n    \"\"\"\n    Transforms the bus and line geodata of a net into a geopandaas geodataframe with the respective\n    geometries.\n\n    :param net: The net for which to convert the geodata\n    :type net: pandapowerNet\n    :param epsg: current epsg projection\n    :type epsg: int, default 4326 (= WGS84)\n    :param node_geodata: flag if to transform the bus geodata table\n    :type node_geodata: bool, default True\n    :param branch_geodata: flag if to transform the line geodata table\n    :type branch_geodata: bool, default True\n    :return: No output.\n    \"\"\"\n    if node_geodata:\n        net[\"bus_geodata\"] = _node_geometries_from_geodata(net[\"bus_geodata\"], epsg)\n    if branch_geodata:\n        net[\"line_geodata\"] = _branch_geometries_from_geodata(net[\"line_geodata\"], epsg)\n    net[\"gis_epsg_code\"] = epsg\n\n\ndef convert_epsg_bus_geodata(net, epsg_in=4326, epsg_out=31467):\n    \"\"\"\n    Converts bus geodata in net from epsg_in to epsg_out\n\n    :param net: The pandapower network\n    :type net: pandapowerNet\n    :param epsg_in: current epsg projection\n    :type epsg_in: int, default 4326 (= WGS84)\n    :param epsg_out: epsg projection to be transformed to\n    :type epsg_out: int, default 31467 (= Gauss-Kr\u00fcger Zone 3)\n    :return: net - the given pandapower network (no copy!)\n    \"\"\"\n    net['bus_geodata'].loc[:, \"x\"], net['bus_geodata'].loc[:, \"y\"] = _convert_xy_epsg(\n        net['bus_geodata'].loc[:, \"x\"], net['bus_geodata'].loc[:, \"y\"], epsg_in, epsg_out)\n    return net\n", "path": "pandapower/plotting/geo.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2022 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\nimport sys\nfrom numpy import array, setdiff1d\n\nfrom pandapower.auxiliary import soft_dependency_error\n\ntry:\n    from shapely.geometry import Point, LineString\n    shapely_INSTALLED = True\nexcept ImportError:\n    shapely_INSTALLED = False\n\ntry:\n    from geopandas import GeoDataFrame, GeoSeries\n    geopandas_INSTALLED = True\nexcept ImportError:\n    geopandas_INSTALLED = False\n\ntry:\n    from pyproj import Proj, transform\n    pyproj_INSTALLED = True\nexcept ImportError:\n    pyproj_INSTALLED = False\n\n\ndef _node_geometries_from_geodata(node_geo, epsg=31467):\n    \"\"\"\n    Creates a geopandas geodataframe from a given dataframe of with node coordinates as x and y\n    values.\n\n    :param node_geo: The dataframe containing the node coordinates (x and y values)\n    :type node_geo: pandas.dataframe\n    :param epsg: The epsg projection of the node coordinates\n    :type epsg: int, default 31467 (= Gauss-Kr\u00fcger Zone 3)\n    :return: node_geodata - a geodataframe containing the node_geo and Points in the geometry column\n    \"\"\"\n    missing_packages = array([\"shapely\", \"geopandas\"])[~array([\n        shapely_INSTALLED, geopandas_INSTALLED])]\n    if len(missing_packages):\n        soft_dependency_error(str(sys._getframe().f_code.co_name)+\"()\", missing_packages)\n    geoms = [Point(x, y) for x, y in node_geo[[\"x\", \"y\"]].values]\n    return GeoDataFrame(node_geo, crs=f\"epsg:{epsg}\", geometry=geoms, index=node_geo.index)\n\n\ndef _branch_geometries_from_geodata(branch_geo, epsg=31467):\n    missing_packages = array([\"shapely\", \"geopandas\"])[~array([\n        shapely_INSTALLED, geopandas_INSTALLED])]\n    if len(missing_packages):\n        soft_dependency_error(str(sys._getframe().f_code.co_name)+\"()\", missing_packages)\n    geoms = GeoSeries([LineString(x) for x in branch_geo.coords.values], index=branch_geo.index,\n                      crs=f\"epsg:{epsg}\")\n    return GeoDataFrame(branch_geo, crs=f\"epsg:{epsg}\", geometry=geoms, index=branch_geo.index)\n\n\ndef _transform_node_geometry_to_geodata(node_geo):\n    \"\"\"\n    Create x and y values from geodataframe\n\n    :param node_geo: The dataframe containing the node geometries (as shapely points)\n    :type node_geo: geopandas.GeoDataFrame\n    :return: bus_geo - The given geodataframe with x and y values\n    \"\"\"\n    node_geo[\"x\"] = [p.x for p in node_geo.geometry]\n    node_geo[\"y\"] = [p.y for p in node_geo.geometry]\n    return node_geo\n\n\ndef _transform_branch_geometry_to_coords(branch_geo):\n    \"\"\"\n    Create coords entries from geodataframe geometries\n\n    :param branch_geo: The dataframe containing the branch geometries (as shapely LineStrings)\n    :type branch_geo: geopandas.GeoDataFrame\n    :return: branch_geo - The given geodataframe with coords\n    \"\"\"\n    branch_geo[\"coords\"] = branch_geo.geometry.apply(lambda x: list(x.coords))\n    return branch_geo\n\n\ndef _convert_xy_epsg(x, y, epsg_in=4326, epsg_out=31467):\n    \"\"\"\n    Converts the given x and y coordinates according to the defined epsg projections.\n\n    :param x: x-values of coordinates\n    :type x: iterable\n    :param y: y-values of coordinates\n    :type y: iterable\n    :param epsg_in: current epsg projection\n    :type epsg_in: int, default 4326 (= WGS84)\n    :param epsg_out: epsg projection to be transformed to\n    :type epsg_out: int, default 31467 (= Gauss-Kr\u00fcger Zone 3)\n    :return: transformed_coords - x and y values in new coordinate system\n    \"\"\"\n    if not pyproj_INSTALLED:\n        soft_dependency_error(str(sys._getframe().f_code.co_name)+\"()\", \"pyproj\")\n    in_proj = Proj(init='epsg:%i' % epsg_in)\n    out_proj = Proj(init='epsg:%i' % epsg_out)\n    return transform(in_proj, out_proj, x, y)\n\n\ndef convert_gis_to_geodata(net, node_geodata=True, branch_geodata=True):\n    \"\"\"\n    Extracts information on bus and line geodata from the geometries of a geopandas geodataframe.\n\n    :param net: The net for which to convert the geodata\n    :type net: pandapowerNet\n    :param node_geodata: flag if to extract x and y values for bus geodata\n    :type node_geodata: bool, default True\n    :param branch_geodata: flag if to extract coordinates values for line geodata\n    :type branch_geodata: bool, default True\n    :return: No output.\n    \"\"\"\n    if node_geodata:\n        _transform_node_geometry_to_geodata(net.bus_geodata)\n    if branch_geodata:\n        _transform_branch_geometry_to_coords(net.line_geodata)\n\n\ndef convert_geodata_to_gis(net, epsg=31467, node_geodata=True, branch_geodata=True):\n    \"\"\"\n    Transforms the bus and line geodata of a net into a geopandaas geodataframe with the respective\n    geometries.\n\n    :param net: The net for which to convert the geodata\n    :type net: pandapowerNet\n    :param epsg: current epsg projection\n    :type epsg: int, default 4326 (= WGS84)\n    :param node_geodata: flag if to transform the bus geodata table\n    :type node_geodata: bool, default True\n    :param branch_geodata: flag if to transform the line geodata table\n    :type branch_geodata: bool, default True\n    :return: No output.\n    \"\"\"\n    if node_geodata:\n        net[\"bus_geodata\"] = _node_geometries_from_geodata(net[\"bus_geodata\"], epsg)\n    if branch_geodata:\n        net[\"line_geodata\"] = _branch_geometries_from_geodata(net[\"line_geodata\"], epsg)\n    net[\"gis_epsg_code\"] = epsg\n\n\ndef convert_epsg_bus_geodata(net, epsg_in=4326, epsg_out=31467):\n    \"\"\"\n    Converts bus geodata in net from epsg_in to epsg_out\n\n    :param net: The pandapower network\n    :type net: pandapowerNet\n    :param epsg_in: current epsg projection\n    :type epsg_in: int, default 4326 (= WGS84)\n    :param epsg_out: epsg projection to be transformed to\n    :type epsg_out: int, default 31467 (= Gauss-Kr\u00fcger Zone 3)\n    :return: net - the given pandapower network (no copy!)\n    \"\"\"\n    net['bus_geodata'].loc[:, \"x\"], net['bus_geodata'].loc[:, \"y\"] = _convert_xy_epsg(\n        net['bus_geodata'].loc[:, \"x\"], net['bus_geodata'].loc[:, \"y\"], epsg_in, epsg_out)\n    return net\n", "path": "pandapower/plotting/geo.py"}]}