- Contact: [email protected]
- Telegram channel: https://t.me/wong2_share
wong2 / beijing_bus Goto Github PK
View Code? Open in Web Editor NEW北京实时公交 for Python
Home Page: https://asciinema.org/a/14510
License: MIT License
北京实时公交 for Python
Home Page: https://asciinema.org/a/14510
License: MIT License
curl -H cid=1024 "http://mc.aibang.com/aiguang/bjgj.c?m=checkUpdate&version=1"
返回:
<?xml version='1.0' encoding="utf-8"?> <root> <status>502</status> <info>抱歉,未能激活,请退出应用,重新打开。</info> </root>
>>> from beijing_bus import BeijingBus
>>> lines = BeijingBus.get_all_lines()
然后,就没有然后了。hang 在那里了
先忽略---我研究一下
python2.7
python manage.py build_cache失败
File "/Users/play/.py2/lib/python2.7/site-packages/dogpile/cache/region.py", line 610, in get_value
value = self.backend.get(key)
File "/Users/play/.py2/lib/python2.7/site-packages/dogpile/cache/backends/file.py", line 230, in get
value = compat.pickle.loads(value)
ValueError: unsupported pickle protocol: 4
是不是北京公交官方改了接口?
微信公众号,也不能使用。路线没有更新。
运行 python manage.py build_cache
会报错, 'NoneType' object is not subscriptable
作者你真的自己试用过吗.......
现无法执行(gdbm.error: Bad magic number
),会不会是依赖项目的版本问题,毕竟已经时隔十个月
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
>>> lines = BeijingBus.get_all_lines()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "beijing_bus/__init__.py", line 13, in get_all_lines
return BusLine.get_all_lines()
File "beijing_bus/line.py", line 73, in get_all_lines
line_ids = cls.get_all_line_ids()
File "/usr/local/lib/python2.7/dist-packages/dogpile/cache/region.py", line 1053, in decorate
should_cache_fn)
File "/usr/local/lib/python2.7/dist-packages/dogpile/cache/region.py", line 657, in get_or_create
async_creator) as value:
File "/usr/local/lib/python2.7/dist-packages/dogpile/lock.py", line 154, in __enter__
return self._enter()
File "/usr/local/lib/python2.7/dist-packages/dogpile/lock.py", line 87, in _enter
value = value_fn()
File "/usr/local/lib/python2.7/dist-packages/dogpile/cache/region.py", line 610, in get_value
value = self.backend.get(key)
File "/usr/local/lib/python2.7/dist-packages/dogpile/cache/backends/file.py", line 220, in get
with self._dbm_file(False) as dbm:
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/usr/local/lib/python2.7/dist-packages/dogpile/cache/backends/file.py", line 215, in _dbm_file
"w" if write else "r")
File "/usr/lib/python2.7/anydbm.py", line 85, in open
return mod.open(file, flag, mode)
gdbm.error: Bad magic number
>>> lines = BeijingBus.get_all_lines()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/justin/beijing_bus/beijing_bus/__init__.py", line 13, in get_all_lines
return BusLine.get_all_lines()
File "/home/justin/beijing_bus/beijing_bus/line.py", line 73, in get_all_lines
line_ids = cls.get_all_line_ids()
File "/usr/local/lib/python3.4/dist-packages/dogpile/cache/region.py", line 1053, in decorate
should_cache_fn)
File "/usr/local/lib/python3.4/dist-packages/dogpile/cache/region.py", line 657, in get_or_create
async_creator) as value:
File "/usr/local/lib/python3.4/dist-packages/dogpile/lock.py", line 154, in __enter__
return self._enter()
File "/usr/local/lib/python3.4/dist-packages/dogpile/lock.py", line 87, in _enter
value = value_fn()
File "/usr/local/lib/python3.4/dist-packages/dogpile/cache/region.py", line 610, in get_value
value = self.backend.get(key)
File "/usr/local/lib/python3.4/dist-packages/dogpile/cache/backends/file.py", line 220, in get
with self._dbm_file(False) as dbm:
File "/usr/lib/python3.4/contextlib.py", line 59, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.4/dist-packages/dogpile/cache/backends/file.py", line 215, in _dbm_file
"w" if write else "r")
File "/usr/lib/python3.4/dbm/__init__.py", line 94, in open
return mod.open(file, flag, mode)
_gdbm.error: Bad magic number
用的是什么反编译工具呢?请教下。
RT
从微信后台看,很多用户都会直接输入 车次 进行查询,这也比较自然,需要想一想如何支持这种查询方式
为应用号做准备
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.