Electric-Vehicle-Route-Planning-on-Google-Map-Reinforcement-Learning icon indicating copy to clipboard operation
Electric-Vehicle-Route-Planning-on-Google-Map-Reinforcement-Learning copied to clipboard

AttributeError: 'environment' object has no attribute 'latt'

Open dsaad68 opened this issue 5 years ago • 6 comments

First of all thank you! I've read your new instruction before questioning. I tested my API Key with the URL in the instruction, it worked smoothly. Although I have installed all needed libraries and then added my Google Map API key to the Enviroment.py in the 3 places that I should but at the end I receive the

env = environment('40.468254,-86.980963', '40.445283,-86.948429')
Traceback (most recent call last):

  File "<ipython-input-55-2cfe142848ca>", line 1, in <module>
    env = environment('40.468254,-86.980963', '40.445283,-86.948429')

  File "/Users/dsaad68/My Files/EV/Environment.py", line 13, in __init__
    self.make_map()

  File "/Users/dsaad68/My Files/EV/Environment.py", line 102, in make_map
    origin_position_num = (self.latt, self.lngg)

AttributeError: 'environment' object has no attribute 'latt'

Could you please help me?

dsaad68 avatar Aug 13 '19 13:08 dsaad68

Thank you for being interested in my project. I've modified the code, please try again. I add code in Environment.py line 24, 25.

However, if you enter this error situation, it means that the query is not successful while calling def geocoding_api(self, address) in Environment.py (line 36).

Dungyichao avatar Apr 12 '20 22:04 Dungyichao

Hi! Finally found a reasonable starting point for my project. Still facing the no attribute issue. Can you please help me?

SyedHamza0196 avatar Mar 16 '22 09:03 SyedHamza0196

Hi Syed, may you show me the error message? Thank you

Dungyichao avatar Mar 17 '22 11:03 Dungyichao

Hi @Dungyichao first of all awesome project secondly I don't know why it started working when I pushed variables from line 24, 25 to line 12, 13 but things are smooth now.

DataPilot avatar Mar 21 '22 12:03 DataPilot

Hi @DataPilot . Thank you for your reply. May you elaborate more on how you fix it? I want to update the tutorial so that more people will be able to run it. I will mention your name as well.

Dungyichao avatar Mar 21 '22 14:03 Dungyichao

Hi @Dungyichao Thanks for your amazing script. I am trying use the same for Here API services by Modifying URL and other supports needed. I am facing AttributeError: 'environment' object has no attribute 'latt'. Could you please give some idea why I am facing this error. Do I need to change complete script for Here API. Sorry I am completely new to this domain and started exploring.

revathisujendran86 avatar Nov 18 '22 21:11 revathisujendran86