Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dsaad68 opened this issue Aug 13, 2019 · 6 comments
Closed

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

dsaad68 opened this issue Aug 13, 2019 · 6 comments

Comments

@dsaad68
Copy link

dsaad68 commented Aug 13, 2019

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?

@Dungyichao
Copy link
Owner

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).

@SyedHamza0196
Copy link

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

@Dungyichao
Copy link
Owner

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

@DataPilot
Copy link

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.

@Dungyichao
Copy link
Owner

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.

@revathisujendran86
Copy link

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.

@dsaad68 dsaad68 closed this as completed Jun 2, 2024
@dsaad68 dsaad68 reopened this Jun 2, 2024
@dsaad68 dsaad68 closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants