derekhe / msfs2020-google-map

Replace MSFS2020's bing map to google map
MIT License
277 stars 37 forks source link

Permission Error #105

Closed Plib0296 closed 2 years ago

Plib0296 commented 2 years ago

BEFORE SUBMIT A BUG, PLEASE READ THE FAQ PAGE HERE: https://github.com/derekhe/msfs2020-google-map/wiki/FAQ

Describe the bug "Use embedded python" Restoring hosts Restoring hosts Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\steve\Desktop\Games Shortcuts\Google Maps Mod\Python39\lib\tkinter__init.py", line 1892, in call__ return self.func(*args) File "C:\Users\steve\Desktop\Games Shortcuts\Google Maps Mod\src\app.py", line 254, in run self.stop() File "C:\Users\steve\Desktop\Games Shortcuts\Google Maps Mod\src\app.py", line 337, in stop restore_hosts() File "C:\Users\steve\Desktop\Games Shortcuts\Google Maps Mod\src\runner.py", line 53, in restore_hosts with open(host_path, "r+") as f: PermissionError: [Errno 13] Permission denied: 'C:\Windows\System32\drivers\etc\hosts'

To Reproduce Clicked 'Run' in the Google Maps Dialog

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

derekhe commented 2 years ago

https://github.com/derekhe/msfs2020-google-map/wiki/FAQ#host-related-issue

derekhe commented 2 years ago

@Plib0296 Did you fix it?

GrimReaper7993 commented 2 years ago

Help, did not copy original Bing maps file. Trying to delete the two lines of code but can't. Also, not able to restore to first version. Need to change back from the google maps mod to bing so that i can play online. pls help.

derekhe commented 2 years ago

It normally caused by antivirus which locks your hosts file. Please have a look at : https://github.com/derekhe/msfs2020-google-map/wiki/FAQ#antivirus

derekhe commented 2 years ago

@Plib0296 fixed?

MAX767300ER commented 2 years ago

Hi! thanks for your valuable time! I am encountering the above issue, tried to delete the host file but the program does not create a new one and after running run.but i get the below message. C:\Users\massi\OneDrive\Desktop\mod maps>if exist .\Python39\python.exe ( echo "Use embedded python" .\Python39\python.exe src\app.py ) else ( echo "Use user python" py -m pip install -r requirements.txt py src\app.py ) "Use embedded python" Restoring hosts Restoring hosts Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\massi\OneDrive\Desktop\mod maps\Python39\lib\tkinter__init.py", line 1892, in call__ return self.func(*args) File "C:\Users\massi\OneDrive\Desktop\mod maps\src\app.py", line 254, in run self.stop() File "C:\Users\massi\OneDrive\Desktop\mod maps\src\app.py", line 337, in stop restore_hosts() File "C:\Users\massi\OneDrive\Desktop\mod maps\src\runner.py", line 52, in restore_hosts os.chmod(host_path, stat.S_IWRITE) FileNotFoundError: [WinError 2] Impossibile trovare il file specificato: 'C:\Windows\System32\drivers\etc\hosts'

Many thanks for your help

GrimReaper7993 commented 2 years ago

Not sure yet. Away from computer for a bit.

Sent via the Samsung Galaxy S10, an AT&T 5G Evolution capable smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: MAX767300ER @.> Sent: Tuesday, November 23, 2021 11:27:31 AM To: derekhe/msfs2020-google-map @.> Cc: GrimReaper7993 @.>; Comment @.> Subject: Re: [derekhe/msfs2020-google-map] Permission Error (Issue #105)

Hi! thanks for your valuable time! I am encountering the above issue, tried to delete the host file but the program does not create a new one and after running run.but i get the below message. C:\Users\massi\OneDrive\Desktop\mod maps>if exist .\Python39\python.exe ( echo "Use embedded python" .\Python39\python.exe src\app.py ) else ( echo "Use user python" py -m pip install -r requirements.txt py src\app.py ) "Use embedded python" Restoring hosts Restoring hosts Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\massi\OneDrive\Desktop\mod maps\Python39\lib\tkinterinit.py", line 1892, in call return self.func(*args) File "C:\Users\massi\OneDrive\Desktop\mod maps\src\app.py", line 254, in run self.stop() File "C:\Users\massi\OneDrive\Desktop\mod maps\src\app.py", line 337, in stop restore_hosts() File "C:\Users\massi\OneDrive\Desktop\mod maps\src\runner.py", line 52, in restore_hosts os.chmod(host_path, stat.S_IWRITE) FileNotFoundError: [WinError 2] Impossibile trovare il file specificato: 'C:\Windows\System32\drivers\etc\hosts'

Many thanks for your help

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/derekhe/msfs2020-google-map/issues/105#issuecomment-977141733, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWTAVGKPRYMN5ZWTMVG3ZILUNP2LHANCNFSM5IN6T25Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

derekhe commented 2 years ago

@MAX767300ER you can create a new empty hosts file using notepad using adminitrator mode.

MAX767300ER commented 2 years ago

It's working perfectly now! Many thanks for your support! Max