Giter Site home page Giter Site logo

pgh-next-rgbus's People

Contributors

dependabot[bot] avatar ulfmagnetics avatar

Watchers

 avatar

pgh-next-rgbus's Issues

Package rgbmatrix no longer exists

Looks like the rgbmatrix package is no longer available on PyPI. As a workaround, we can clone the parent repo at https://github.com/hzeller/rpi-rgb-led-matrix into a sibling directory to pgh-next-rgbus, e.g.:

pi@pi3-nextbus:~/src/pgh-next-rgbus$ ls -al ..
total 2492
drwxr-xr-x  8 pi pi    4096 Jan 18  2020 .
drwxr-xr-x 23 pi pi    4096 Nov  5 11:57 ..
drwxr-xr-x  9 pi pi    4096 Nov  5 12:01 pgh-next-rgbus
drwxr-xr-x 10 pi pi    4096 Oct  7  2019 rpi-rgb-led-matrix

and then update requirements.txt to point to the relative path of the python bindings in that repo:

../rpi-rgb-led-matrix/bindings/python/

Handle API downtime gracefully

n 21 17:48:46 pi3-nextbus python3[5959]:   File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 449, in send
Jan 21 17:48:46 pi3-nextbus python3[5959]:     timeout=timeout
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
Jan 21 17:48:46 pi3-nextbus python3[5959]:     _stacktrace=sys.exc_info()[2])
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py", line 399, in increment
Jan 21 17:48:46 pi3-nextbus python3[5959]:     raise MaxRetryError(_pool, url, error or ResponseError(cause))
Jan 21 17:48:46 pi3-nextbus python3[5959]: urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='realtime.portauthority.org', port=80): Max retries exceeded with url: /bustime/api/v1/getpredictions
Jan 21 17:48:46 pi3-nextbus python3[5959]: During handling of the above exception, another exception occurred:
Jan 21 17:48:46 pi3-nextbus python3[5959]: Traceback (most recent call last):
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
Jan 21 17:48:46 pi3-nextbus python3[5959]:     self.run()
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/home/pi/src/pgh-next-rgbus/pghnextrgbus/matrix.py", line 32, in run
Jan 21 17:48:46 pi3-nextbus python3[5959]:     arrivals = self.arrivals_to_render()
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/home/pi/src/pgh-next-rgbus/pghnextrgbus/matrix.py", line 26, in arrivals_to_render
Jan 21 17:48:46 pi3-nextbus python3[5959]:     for arrival in locator.next_arrivals():
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/home/pi/src/pgh-next-rgbus/pghnextrgbus/locator.py", line 33, in next_arrivals
Jan 21 17:48:46 pi3-nextbus python3[5959]:     prd = self.predictions()
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/home/pi/src/pgh-next-rgbus/pghnextrgbus/locator.py", line 55, in predictions
Jan 21 17:48:46 pi3-nextbus python3[5959]:     response = self.api().predictions(stpid=self.stop_id)
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/home/pi/src/pgh-next-rgbus/src/pgh-bustime/pghbustime/interface.py", line 326, in predictions
Jan 21 17:48:46 pi3-nextbus python3[5959]:     return self.response(url)
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/home/pi/src/pgh-next-rgbus/src/pgh-bustime/pghbustime/interface.py", line 91, in response
Jan 21 17:48:46 pi3-nextbus python3[5959]:     resp = requests.get(url).content
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/usr/local/lib/python3.5/dist-packages/requests/api.py", line 75, in get
Jan 21 17:48:46 pi3-nextbus python3[5959]:     return request('get', url, params=params, **kwargs)
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/usr/local/lib/python3.5/dist-packages/requests/api.py", line 60, in request
Jan 21 17:48:46 pi3-nextbus python3[5959]:     return session.request(method=method, url=url, **kwargs)
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 533, in request
Jan 21 17:48:46 pi3-nextbus python3[5959]:     resp = self.send(prep, **send_kwargs)
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 646, in send
Jan 21 17:48:46 pi3-nextbus python3[5959]:     r = adapter.send(request, **kwargs)
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 516, in send
Jan 21 17:48:46 pi3-nextbus python3[5959]:     raise ConnectionError(e, request=request)
Jan 21 17:48:46 pi3-nextbus python3[5959]: requests.exceptions.ConnectionError: HTTPConnectionPool(host='realtime.portauthority.org', port=80): Max retries exceeded with url: /bustime/api/v1/getpredicti
Jan 21 17:48:46 pi3-nextbus python3[5959]: Traceback (most recent call last):
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "run.py", line 4, in <module>
Jan 21 17:48:46 pi3-nextbus python3[5959]:     pghnextrgbus.main(sys.argv[1:])
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/home/pi/src/pgh-next-rgbus/pghnextrgbus/core.py", line 41, in main
Jan 21 17:48:46 pi3-nextbus python3[5959]:     renderer.start()
Jan 21 17:48:46 pi3-nextbus python3[5959]:   File "/usr/lib/python3.5/threading.py", line 840, in start
Jan 21 17:48:46 pi3-nextbus python3[5959]:     raise RuntimeError("threads can only be started once")
Jan 21 17:48:46 pi3-nextbus python3[5959]: RuntimeError: threads can only be started once

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.