Программы на Python
Anonymous
Keyerror Traceback (последний звонок в последний раз)
Сообщение
Anonymous » 05 июл 2025, 05:06
Код: Выделить всё
**from geopy.geocoders import Here
exif = get_exif('earth_postcard_1599147372.jpg')
geotags = get_geotagging(exif)
coords = get_coordinates(geotags)
geocoder = Here(apikey=os.environ['API_KEY'])
print(geocoder.reverse("%s,%s" % coords))**
ERROR
KeyError Traceback (most recent call last)
in
4 geotags = get_geotagging(exif)
5 coords = get_coordinates(geotags)
----> 6 geocoder = Here(apikey=os.environ['API_KEY'])
7 print(geocoder.reverse("%s,%s" % coords))
~\anaconda3\lib\os.py in __getitem__(self, key)
677 except KeyError:
678 # raise KeyError with the original key value
--> 679 raise KeyError(key) from None
680 return self.decodevalue(value)
681
KeyError: 'API_KEY'
Здесь я стараюсь получить местоположение широты и долготы с использованием библиотеки геопи, но я получаю ошибку ключа
Подробнее здесь:
https://stackoverflow.com/questions/671 ... -call-last
1751681195
Anonymous
[code]**from geopy.geocoders import Here exif = get_exif('earth_postcard_1599147372.jpg') geotags = get_geotagging(exif) coords = get_coordinates(geotags) geocoder = Here(apikey=os.environ['API_KEY']) print(geocoder.reverse("%s,%s" % coords))** ERROR KeyError Traceback (most recent call last) in 4 geotags = get_geotagging(exif) 5 coords = get_coordinates(geotags) ----> 6 geocoder = Here(apikey=os.environ['API_KEY']) 7 print(geocoder.reverse("%s,%s" % coords)) ~\anaconda3\lib\os.py in __getitem__(self, key) 677 except KeyError: 678 # raise KeyError with the original key value --> 679 raise KeyError(key) from None 680 return self.decodevalue(value) 681 KeyError: 'API_KEY' [/code] Здесь я стараюсь получить местоположение широты и долготы с использованием библиотеки геопи, но я получаю ошибку ключа Подробнее здесь: [url]https://stackoverflow.com/questions/67134095/keyerror-traceback-most-recent-call-last[/url]
0 Ответы
18 Просмотры
Последнее сообщение Anonymous
17 фев 2025, 01:23
0 Ответы
7 Просмотры
Последнее сообщение Anonymous
02 май 2025, 23:06
0 Ответы
8 Просмотры
Последнее сообщение Anonymous
03 май 2025, 23:05
Traceback (самый последний звонок последний) ошибка в Python
Anonymous »
09 июн 2025, 13:34 » в форуме
Python
Я получаю эту ошибку:
Traceback (most recent call last):
File /opt/render/project/src/bot.py , line 4, in from google import genai as google_genai
ImportError: cannot import name 'genai' from 'google' (unknown location)
Вот мой код:
import...
0 Ответы
4 Просмотры
Последнее сообщение Anonymous
09 июн 2025, 13:34
Traceback (самый последний звонок последний) ошибка в Python
Anonymous »
27 июн 2025, 03:26 » в форуме
Python
def adder(l1,l2,op):
if(op == 0):
carry = 0
result = []
l1.reverse()
l2.reverse()
for x in range(0, 4):
sum = l1 + l2 + carry
if(sum == 0):
result = 0
carry = 0
elif(sum == 1):
result = 1
carry = 0
elif(sum == 2):
result = 0
carry = 1
elif(sum...
0 Ответы
2 Просмотры
Последнее сообщение Anonymous
27 июн 2025, 03:26