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

Update Google Map Server code/instructions #19

Closed
potto216 opened this issue Jul 20, 2019 · 9 comments
Closed

Update Google Map Server code/instructions #19

potto216 opened this issue Jul 20, 2019 · 9 comments
Labels

Comments

@potto216
Copy link
Contributor

I'm having problems using the Google Map Server example. It is warning me that the keyless option will soon be deprecated and what is worse I cannot get the detected tracks to show up. If the project is still being maintained I would be happy to debug the issue and submit a PR.

@mhostetter
Copy link
Owner

Help here would be very welcome. A while back I did notice a similar issue. At the time of development, operation worked well without an API key. I think users received N free uses (tile queries, etc) per day. It seems Google is cracking down a bit.

@mhostetter
Copy link
Owner

Also, full disclosure, this was my first foray into web development of any kind. So, the javascript and Flask webserver surely could be improved. 😆

@mhostetter mhostetter added the bug label Jul 20, 2019
@potto216
Copy link
Contributor Author

Thanks for the info, I was planning on forking the repo and creating a branch PR unless you rather I make the changes on master.

@mhostetter
Copy link
Owner

Yes, that sounds good. I would make the changes on a separate branch.

@mhostetter
Copy link
Owner

I am testing now with my setup. The Google Maps webpage gives me "For development purposes only" watermarks and a Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys warning, but I do see the plane tracks.

Can you provide me any more diagnostics (webserver stdout, webpage console, etc) on your setup. I might be able to help you debug why you aren't seeing planes on the webpage.

@potto216
Copy link
Contributor Author

I was getting

(ads_b_app) user@sdr:~/src/ads_b_app/web$ python ./webserver.py
Waiting for zmq socket to connect.
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/home/user/.pyenv/versions/3.7.4/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/home/user/.pyenv/versions/3.7.4/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "./webserver.py", line 42, in background_thread
    socket.setsockopt(zmq.SUBSCRIBE, "")
  File "zmq/backend/cython/socket.pyx", line 426, in zmq.backend.cython.socket.Socket.set
TypeError: unicode not allowed, use setsockopt_string

 * Restarting with stat
 * Debugger is active!
Waiting for zmq socket to connect.
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/home/user/.pyenv/versions/3.7.4/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/home/user/.pyenv/versions/3.7.4/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/src/ads_b_app/web/webserver.py", line 42, in background_thread
    socket.setsockopt(zmq.SUBSCRIBE, "")
  File "zmq/backend/cython/socket.pyx", line 426, in zmq.backend.cython.socket.Socket.set
TypeError: unicode not allowed, use setsockopt_string

Which went away when I forced a binary string in
socket.setsockopt(zmq.SUBSCRIBE, b"")
in webserver.py. I'll try it with live data shortly and add a comment with my result.

@mhostetter
Copy link
Owner

The python webserver needs to run with Python 2.7. I probably should make that more clear in the docs. It's very likely the zmq and flask packages are different for Python 3. It appears your python symlink is referencing Python 3.7.

@potto216
Copy link
Contributor Author

Oh okay my bad, I'll try it with Python 2.7. That will be an easy issue to close:)

@potto216
Copy link
Contributor Author

I was able to get the map server code to work without problems when I had properly set my environment to Python 2.7. Therefore this is not an issue an I am closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants