Giter VIP home page Giter VIP logo

beijing_bus's Introduction

beijing_bus's People

Contributors

wong2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beijing_bus's Issues

好像不好用了

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

更自然的查询方式

从微信后台看,很多用户都会直接输入 车次 进行查询,这也比较自然,需要想一想如何支持这种查询方式

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.