ClimateCompatibleGrowth / GeoH2

Geospatial analysis of green hydrogen production costs.
MIT License
11 stars 4 forks source link

optimize_transport_and_conversion.py error #20

Open Bachirou06 opened 1 week ago

Bachirou06 commented 1 week ago

Hi all, I am novice using GeoH2, i am running an analysis for given country. I came accros an error related to the coordinate normalization in geodesic which seems to be depreciated. I will be grateful with some hint. Below is the error

geopy 2.4.1 pyhd8ed1ab_1 conda-forge geos 3.11.0 h39d44d4_0 conda-forge

for i in range(len(hexagon)):

calculate distance to demand for each hexagon

    poly = shapely.wkt.loads(str(hexagon['geometry'][i]))
    center = poly.centroid
    demand_coords = (demand_center_list.loc[d,'Lat [deg]'], demand_center_list.loc[d,'Lon [deg]'])
    hexagon_coords = (center.y, center.x)
    dist = geopy.distance.geodesic(demand_coords, hexagon_coords).km

    distance_to_demand[i] = dist

…………………………… …………… …… …. .. 187 latitude, longitude, altitude = \ --> 188 _normalize_coordinates(latitude, longitude, altitude) 190 self = super().new(cls) 191 self.latitude = latitude

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:74, in _normalize_coordinates(latitude, longitude, altitude) 66 if abs(latitude) > 90: 67 warnings.warn('Latitude normalization has been prohibited in the newer ' 68 'versions of geopy, because the normalized value happened ' 69 'to be on a different pole, which is probably not what was ' (...) 72 '(latitude, longitude) or (y, x) in Cartesian terms.', 73 UserWarning, stacklevel=3) ---> 74 raise ValueError('Latitude must be in the [-90; 90] range.') 76 if abs(longitude) > 180: 77 # Longitude normalization is pretty straightforward and doesn't seem 78 # to be error-prone, so there's nothing to complain about. 79 longitude = _normalize_angle(longitude, 180.0)

ValueError: Latitude must be in the [-90; 90] range.

samiyhanaqvi commented 1 week ago

Hi,

Thank you for emailing.

The error is saying that the Latitude must be between -90 and 90.

From the error snippet that you have sent, I am not able to see which line in the code the error is coming from, but it could help to check your parameter file where you have your latitude stored.

Many thanks, Samiyha


From: DJIBO BOUBE Bachirou @.> Sent: 10 October 2024 23:20 To: ClimateCompatibleGrowth/GeoH2 @.> Cc: Subscribed @.***> Subject: [ClimateCompatibleGrowth/GeoH2] optimize_transport_and_conversion.py error (Issue #20)

Hi all, I am novice using GeoH2, i am running an analysis for given country. I came accros an error related to the coordinate normalization in geodesic which seems to be depreciated. I will be grateful with some hint. Below is the error

for i in range(len(hexagon)):

calculate distance to demand for each hexagon

poly = shapely.wkt.loads(str(hexagon['geometry'][i])) center = poly.centroid demand_coords = (demand_center_list.loc[d,'Lat [deg]'], demand_center_list.loc[d,'Lon [deg]']) hexagon_coords = (center.y, center.x) dist = geopy.distance.geodesic(demand_coords, hexagon_coords).km

distance_to_demand[i] = dist

…………………………… …………… …… …. .. 187 latitude, longitude, altitude = --> 188 _normalize_coordinates(latitude, longitude, altitude) 190 self = super().new(cls) 191 self.latitude = latitude

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:74http://localhost:8892/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/point.py#line=73, in _normalize_coordinates(latitude, longitude, altitude) 66 if abs(latitude) > 90: 67 warnings.warn('Latitude normalization has been prohibited in the newer ' 68 'versions of geopy, because the normalized value happened ' 69 'to be on a different pole, which is probably not what was ' (...) 72 '(latitude, longitude) or (y, x) in Cartesian terms.', 73 UserWarning, stacklevel=3) ---> 74 raise ValueError('Latitude must be in the [-90; 90] range.') 76 if abs(longitude) > 180: 77 # Longitude normalization is pretty straightforward and doesn't seem 78 # to be error-prone, so there's nothing to complain about. 79 longitude = _normalize_angle(longitude, 180.0)

ValueError: Latitude must be in the [-90; 90] range.

— Reply to this email directly, view it on GitHubhttps://github.com/ClimateCompatibleGrowth/GeoH2/issues/20, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BKKL4AWEGDMJCYOOQWGCKDTZ234RFAVCNFSM6AAAAABPXXFOACVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3TSOJVG43DENI. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Bachirou06 commented 1 week ago

Thanks for your prompte response: The error is on the line 115 115 dist = geopy.distance.geodesic(demand_coords, hexagon_coords).km

i have even shift back to the geopy 2.0 instead of 2.4.1 The country bbox is: 'NE': ('Niger', (0.295646396495, 11.6601671412, 15.9032466977, 23.4716684026)), Kindly receive below further explanation.

C:\Users\hp\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:471: UserWarning: Latitude normalization has been prohibited in the newer versions of geopy, because the normalized value happened to be on a different pole, which is probably not what was meant. If you pass coordinates as positional args, please make sure that the order is (latitude, longitude) or (y, x) in Cartesian terms. return cls(*args)

ValueError Traceback (most recent call last) Cell In[15], line 115 113 #hexagon_coords = (center.x, center.y) 114 hexagon_coords = (center.y, center.x) --> 115 dist = geopy.distance.geodesic(demand_coords, hexagon_coords).km 117 distance_to_demand[i] = dist 119 #!!! maybe this is the place to set a restriction based on distance to demand center-- for all hexagons with a distance below some cutoff point 120 # label demand location under consideration

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\distance.py:418, in geodesic.init(self, *args, *kwargs) 416 self.set_ellipsoid(kwargs.pop('ellipsoid', 'WGS-84')) 417 major, minor, f = self.ELLIPSOID --> 418 super().init(args, **kwargs)

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\distance.py:201, in Distance.init(self, *args, kwargs) 199 elif len(args) > 1: 200 for a, b in util.pairwise(args): --> 201 kilometers += self.measure(a, b) 203 kilometers += units.kilometers(kwargs) 204 self.__kilometers = kilometers

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\distance.py:438, in geodesic.measure(self, a, b) 437 def measure(self, a, b): --> 438 a, b = Point(a), Point(b) 439 _ensure_same_altitude(a, b) 440 lat1, lon1 = a.latitude, a.longitude

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:174, in Point.new(cls, latitude, longitude, altitude) 170 raise TypeError( 171 "Failed to create Point instance from %r." % (arg,) 172 ) 173 else: --> 174 return cls.from_sequence(seq) 176 if single_arg: 177 raise ValueError( 178 'A single number has been passed to the Point ' 179 'constructor. This is probably a mistake, because ' (...) 183 'to get rid of this error.' 184 )

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:471, in Point.from_sequence(cls, seq) 468 if len(args) > 3: 469 raise ValueError('When creating a Point from sequence, it ' 470 'must not have more than 3 items.') --> 471 return cls(*args)

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:187, in Point.new(cls, latitude, longitude, altitude) 176 if single_arg: 177 raise ValueError( 178 'A single number has been passed to the Point ' 179 'constructor. This is probably a mistake, because ' (...) 183 'to get rid of this error.' 184 ) 186 latitude, longitude, altitude = \ --> 187 _normalize_coordinates(latitude, longitude, altitude) 189 self = super().new(cls) 190 self.latitude = latitude

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:74, in _normalize_coordinates(latitude, longitude, altitude) 66 if abs(latitude) > 90: 67 warnings.warn('Latitude normalization has been prohibited in the newer ' 68 'versions of geopy, because the normalized value happened ' 69 'to be on a different pole, which is probably not what was ' (...) 72 '(latitude, longitude) or (y, x) in Cartesian terms.', 73 UserWarning, stacklevel=3) ---> 74 raise ValueError('Latitude must be in the [-90; 90] range.') 76 if abs(longitude) > 180: 77 # Longitude normalization is pretty straightforward and doesn't seem 78 # to be error-prone, so there's nothing to complain about. 79 longitude = _normalize_angle(longitude, 180.0)

ValueError: Latitude must be in the [-90; 90] range.

samiyhanaqvi commented 1 week ago

Thank you for sharing more information.

Can you check your Parameters/demand_parameters.xlsx file and share your latitude and longitude values with me please.

Many thanks, Samiyha


From: DJIBO BOUBE Bachirou @.> Sent: 11 October 2024 11:04 To: ClimateCompatibleGrowth/GeoH2 @.> Cc: Samiyha Naqvi @.>; Comment @.> Subject: Re: [ClimateCompatibleGrowth/GeoH2] optimize_transport_and_conversion.py error (Issue #20)

Thanks for your prompte response: The error is on the line 115 115 dist = geopy.distance.geodesic(demand_coords, hexagon_coords).km

i have even shift back to the geopy 2.0 instead of 2.4.1

Kindly receive below further explanation.

C:\Users\hp\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:471: UserWarning: Latitude normalization has been prohibited in the newer versions of geopy, because the normalized value happened to be on a different pole, which is probably not what was meant. If you pass coordinates as positional args, please make sure that the order is (latitude, longitude) or (y, x) in Cartesian terms. return cls(*args)

ValueError Traceback (most recent call last) Cell In[15], line 115 113 #hexagon_coords = (center.x, center.y) 114 hexagon_coords = (center.y, center.x) --> 115 dist = geopy.distance.geodesic(demand_coords, hexagon_coords).km 117 distance_to_demand[i] = dist 119 #!!! maybe this is the place to set a restriction based on distance to demand center-- for all hexagons with a distance below some cutoff point 120 # label demand location under consideration

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\distance.py:418http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/distance.py#line=417, in geodesic.init(self, *args, *kwargs) 416 self.set_ellipsoid(kwargs.pop('ellipsoid', 'WGS-84')) 417 major, minor, f = self.ELLIPSOID --> 418 super().init(args, **kwargs)

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\distance.py:201http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/distance.py#line=200, in Distance.init(self, *args, kwargs) 199 elif len(args) > 1: 200 for a, b in util.pairwise(args): --> 201 kilometers += self.measure(a, b) 203 kilometers += units.kilometers(kwargs) 204 self.__kilometers = kilometers

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\distance.py:438http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/distance.py#line=437, in geodesic.measure(self, a, b) 437 def measure(self, a, b): --> 438 a, b = Point(a), Point(b) 439 _ensure_same_altitude(a, b) 440 lat1, lon1 = a.latitude, a.longitude

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:174http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/point.py#line=173, in Point.new(cls, latitude, longitude, altitude) 170 raise TypeError( 171 "Failed to create Point instance from %r." % (arg,) 172 ) 173 else: --> 174 return cls.from_sequence(seq) 176 if single_arg: 177 raise ValueError( 178 'A single number has been passed to the Point ' 179 'constructor. This is probably a mistake, because ' (...) 183 'to get rid of this error.' 184 )

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:471http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/point.py#line=470, in Point.from_sequence(cls, seq) 468 if len(args) > 3: 469 raise ValueError('When creating a Point from sequence, it ' 470 'must not have more than 3 items.') --> 471 return cls(*args)

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:187http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/point.py#line=186, in Point.new(cls, latitude, longitude, altitude) 176 if single_arg: 177 raise ValueError( 178 'A single number has been passed to the Point ' 179 'constructor. This is probably a mistake, because ' (...) 183 'to get rid of this error.' 184 ) 186 latitude, longitude, altitude = --> 187 _normalize_coordinates(latitude, longitude, altitude) 189 self = super().new(cls) 190 self.latitude = latitude

File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:74http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/point.py#line=73, in _normalize_coordinates(latitude, longitude, altitude) 66 if abs(latitude) > 90: 67 warnings.warn('Latitude normalization has been prohibited in the newer ' 68 'versions of geopy, because the normalized value happened ' 69 'to be on a different pole, which is probably not what was ' (...) 72 '(latitude, longitude) or (y, x) in Cartesian terms.', 73 UserWarning, stacklevel=3) ---> 74 raise ValueError('Latitude must be in the [-90; 90] range.') 76 if abs(longitude) > 180: 77 # Longitude normalization is pretty straightforward and doesn't seem 78 # to be error-prone, so there's nothing to complain about. 79 longitude = _normalize_angle(longitude, 180.0)

ValueError: Latitude must be in the [-90; 90] range.

— Reply to this email directly, view it on GitHubhttps://github.com/ClimateCompatibleGrowth/GeoH2/issues/20#issuecomment-2407074481, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BKKL4ASV2I7R2DOXQLM47VDZ26PBVAVCNFSM6AAAAABPXXFOACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBXGA3TINBYGE. You are receiving this because you commented.Message ID: @.***>

Bachirou06 commented 1 week ago

Thank you for sharing more information. Can you check your Parameters/demand_parameters.xlsx file and share your latitude and longitude values with me please. Many thanks, Samiyha Lat [deg] : 13, Lon[deg]: 2

image

____ From: DJIBO BOUBE Bachirou @.> Sent: 11 October 2024 11:04 To: ClimateCompatibleGrowth/GeoH2 @.> Cc: Samiyha Naqvi @.>; Comment @.> Subject: Re: [ClimateCompatibleGrowth/GeoH2] optimize_transport_and_conversion.py error (Issue #20) Thanks for your prompte response: The error is on the line 115 115 dist = geopy.distance.geodesic(demand_coords, hexagon_coords).km i have even shift back to the geopy 2.0 instead of 2.4.1 Kindly receive below further explanation. C:\Users\hp\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:471: UserWarning: Latitude normalization has been prohibited in the newer versions of geopy, because the normalized value happened to be on a different pole, which is probably not what was meant. If you pass coordinates as positional args, please make sure that the order is (latitude, longitude) or (y, x) in Cartesian terms. return cls(args) ValueError Traceback (most recent call last) Cell In[15], line 115 113 #hexagon_coords = (center.x, center.y) 114 hexagon_coords = (center.y, center.x) --> 115 dist = geopy.distance.geodesic(demand_coords, hexagon_coords).km 117 distance_to_demand[i] = dist 119 #!!! maybe this is the place to set a restriction based on distance to demand center-- for all hexagons with a distance below some cutoff point 120 # label demand location under consideration File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\distance.py:418http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/distance.py#line=417, in geodesic.init(self, args, kwargs) 416 self.set_ellipsoid(kwargs.pop('ellipsoid', 'WGS-84')) 417 major, minor, f = self.ELLIPSOID --> 418 super().init(*args, *kwargs) File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\distance.py:201http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/distance.py#line=200, in Distance.init(self, args, kwargs) 199 elif len(args) > 1: 200 for a, b in util.pairwise(args): --> 201 kilometers += self.measure(a, b) 203 kilometers += units.kilometers(kwargs) 204 self.__kilometers = kilometers File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\distance.py:438http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/distance.py#line=437, in geodesic.measure(self, a, b) 437 def measure(self, a, b): --> 438 a, b = Point(a), Point(b) 439 _ensure_same_altitude(a, b) 440 lat1, lon1 = a.latitude, a.longitude File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:174http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/point.py#line=173, in Point.new(cls, latitude, longitude, altitude) 170 raise TypeError( 171 "Failed to create Point instance from %r." % (arg,) 172 ) 173 else: --> 174 return cls.from_sequence(seq) 176 if single_arg: 177 raise ValueError( 178 'A single number has been passed to the Point ' 179 'constructor. This is probably a mistake, because ' (...) 183 'to get rid of this error.' 184 ) File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:471http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/point.py#line=470, in Point.from_sequence(cls, seq) 468 if len(args) > 3: 469 raise ValueError('When creating a Point from sequence, it ' 470 'must not have more than 3 items.') --> 471 return cls(args) File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:187http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/point.py#line=186, in Point.new(cls, latitude, longitude, altitude) 176 if single_arg: 177 raise ValueError( 178 'A single number has been passed to the Point ' 179 'constructor. This is probably a mistake, because ' (...) 183 'to get rid of this error.' 184 ) 186 latitude, longitude, altitude = --> 187 _normalize_coordinates(latitude, longitude, altitude) 189 self = super().new(cls) 190 self.latitude = latitude File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:74http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/point.py#line=73, in _normalize_coordinates(latitude, longitude, altitude) 66 if abs(latitude) > 90: 67 warnings.warn('Latitude normalization has been prohibited in the newer ' 68 'versions of geopy, because the normalized value happened ' 69 'to be on a different pole, which is probably not what was ' (...) 72 '(latitude, longitude) or (y, x) in Cartesian terms.', 73 UserWarning, stacklevel=3) ---> 74 raise ValueError('Latitude must be in the [-90; 90] range.') 76 if abs(longitude) > 180: 77 # Longitude normalization is pretty straightforward and doesn't seem 78 # to be error-prone, so there's nothing to complain about. 79 longitude = _normalize_angle(longitude, 180.0) ValueError: Latitude must be in the [-90; 90] range. — Reply to this email directly, view it on GitHub<#20 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BKKL4ASV2I7R2DOXQLM47VDZ26PBVAVCNFSM6AAAAABPXXFOACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBXGA3TINBYGE. You are receiving this because you commented.Message ID: @.>

samiyhanaqvi commented 1 week ago

I've just realised that you might be using an older version of the repo. Have you pulled from the repo recently to update your version?

Please try the below when you are in the GeoH2 folder (if you haven't updated it since September 25th):

git pull origin main

And then please read the Readme as we have updated the code. Remember to update the environment with the new environment.yaml file.

If this is not the case, please could you send a screenshot(s) of the full error in your terminal/console and the contents of your hexagons_withcountry{COUNTRY ISO CODE}.geojson file, as this might be where the latitude is above 90 or below -90.

Many thanks, Samiyha


From: DJIBO BOUBE Bachirou @.> Sent: 11 October 2024 17:02 To: ClimateCompatibleGrowth/GeoH2 @.> Cc: Samiyha Naqvi @.>; Comment @.> Subject: Re: [ClimateCompatibleGrowth/GeoH2] optimize_transport_and_conversion.py error (Issue #20)

Thank you for sharing more information. Can you check your Parameters/demand_parameters.xlsx file and share your latitude and longitude values with me please. Many thanks, Samiyha Lat [deg] : 13, Lon[deg]: 2

image.png (view on web)https://github.com/user-attachments/assets/9ebfce10-fd16-4b25-8387-e890a98af1aa

____ From: DJIBO BOUBE Bachirou @.> Sent: 11 October 2024 11:04 To: ClimateCompatibleGrowth/GeoH2 @.> Cc: Samiyha Naqvi @.>; Comment @.> Subject: Re: [ClimateCompatibleGrowth/GeoH2] optimize_transport_and_conversion.py error (Issue #20https://github.com/ClimateCompatibleGrowth/GeoH2/issues/20) Thanks for your prompte response: The error is on the line 115 115 dist = geopy.distance.geodesic(demand_coords, hexagon_coords).km i have even shift back to the geopy 2.0 instead of 2.4.1 Kindly receive below further explanation. C:\Users\hp\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:471: UserWarning: Latitude normalization has been prohibited in the newer versions of geopy, because the normalized value happened to be on a different pole, which is probably not what was meant. If you pass coordinates as positional args, please make sure that the order is (latitude, longitude) or (y, x) in Cartesian terms. return cls(args) ValueError Traceback (most recent call last) Cell In[15], line 115 113 #hexagon_coords = (center.x, center.y) 114 hexagon_coords = (center.y, center.x) --> 115 dist = geopy.distance.geodesic(demand_coords, hexagon_coords).km 117 distance_to_demand[i] = dist 119 #!!! maybe this is the place to set a restriction based on distance to demand center-- for all hexagons with a distance below some cutoff point 120 # label demand location under consideration File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\distance.py:418http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/distance.py#line=417, in geodesic.init(self, args, kwargs) 416 self.set_ellipsoid(kwargs.pop('ellipsoid', 'WGS-84')) 417 major, minor, f = self.ELLIPSOID --> 418 super().init(*args, *kwargs) File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\distance.py:201http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/distance.py#line=200, in Distance.init(self, args, kwargs) 199 elif len(args) > 1: 200 for a, b in util.pairwise(args): --> 201 kilometers += self.measure(a, b) 203 kilometers += units.kilometers(kwargs) 204 self.__kilometers = kilometers File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\distance.py:438http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/distance.py#line=437, in geodesic.measure(self, a, b) 437 def measure(self, a, b): --> 438 a, b = Point(a), Point(b) 439 _ensure_same_altitude(a, b) 440 lat1, lon1 = a.latitude, a.longitude File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:174http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/point.py#line=173, in Point.new(cls, latitude, longitude, altitude) 170 raise TypeError( 171 "Failed to create Point instance from %r." % (arg,) 172 ) 173 else: --> 174 return cls.from_sequence(seq) 176 if single_arg: 177 raise ValueError( 178 'A single number has been passed to the Point ' 179 'constructor. This is probably a mistake, because ' (...) 183 'to get rid of this error.' 184 ) File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:471http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/point.py#line=470, in Point.from_sequence(cls, seq) 468 if len(args) > 3: 469 raise ValueError('When creating a Point from sequence, it ' 470 'must not have more than 3 items.') --> 471 return cls(args) File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:187http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/point.py#line=186, in Point.new(cls, latitude, longitude, altitude) 176 if single_arg: 177 raise ValueError( 178 'A single number has been passed to the Point ' 179 'constructor. This is probably a mistake, because ' (...) 183 'to get rid of this error.' 184 ) 186 latitude, longitude, altitude = --> 187 _normalize_coordinates(latitude, longitude, altitude) 189 self = super().new(cls) 190 self.latitude = latitude File ~\AppData\Local\miniconda3\envs\geoh2\lib\site-packages\geopy\point.py:74http://localhost:8957/lab/tree/~/AppData/Local/miniconda3/envs/geoh2/lib/site-packages/geopy/point.py#line=73, in _normalize_coordinates(latitude, longitude, altitude) 66 if abs(latitude) > 90: 67 warnings.warn('Latitude normalization has been prohibited in the newer ' 68 'versions of geopy, because the normalized value happened ' 69 'to be on a different pole, which is probably not what was ' (...) 72 '(latitude, longitude) or (y, x) in Cartesian terms.', 73 UserWarning, stacklevel=3) ---> 74 raise ValueError('Latitude must be in the [-90; 90] range.') 76 if abs(longitude) > 180: 77 # Longitude normalization is pretty straightforward and doesn't seem 78 # to be error-prone, so there's nothing to complain about. 79 longitude = _normalize_angle(longitude, 180.0) ValueError: Latitude must be in the [-90; 90] range. — Reply to this email directly, view it on GitHub<#20 (comment)https://github.com/ClimateCompatibleGrowth/GeoH2/issues/20#issuecomment-2407074481>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BKKL4ASV2I7R2DOXQLM47VDZ26PBVAVCNFSM6AAAAABPXXFOACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBXGA3TINBYGE. You are receiving this because you commented.Message ID: @.>

— Reply to this email directly, view it on GitHubhttps://github.com/ClimateCompatibleGrowth/GeoH2/issues/20#issuecomment-2407708592, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BKKL4ASEOREJOIIWOHR3R5DZ27ZAPAVCNFSM6AAAAABPXXFOACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBXG4YDQNJZGI. You are receiving this because you commented.Message ID: @.***>

Bachirou06 commented 2 days ago

Hi @samiyhanaqvi,

I'm sorry for not getting back to you sooner, but I'm using the two versions. The current issue is related to the first version I am still exploring the new versions I will come back for further information regarding.

Thanks for reaching out.