cqu-ai / cqu-kb Goto Github PK
View Code? Open in Web Editor NEW第三方重庆大学课表日历生成工具
License: GNU Affero General Public License v3.0
第三方重庆大学课表日历生成工具
License: GNU Affero General Public License v3.0
Traceback (most recent call last):
File "/home/mc/.local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/mc/.local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/mc/.local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/mc/.local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/mc/.local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/mc/.local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "./app.py", line 14, in get_ical
server_main(username, password, path)
File "/home/mc/.local/lib/python3.6/site-packages/cqu_kb/__main__.py", line 11, in server_main
main(username, password, path)
File "/home/mc/.local/lib/python3.6/site-packages/cqu_kb/__main__.py", line 32, in main
data=get_payload(student)
File "/home/mc/.local/lib/python3.6/site-packages/cqu_kb/core.py", line 118, in get_cal
day = chinese_to_numbers[course['time'].split('[')[0]]
KeyError: 'Ò»'
This only appears in some special cases. The character may come from the trash website.
比如锤子日历(当然这是它们的锅)。
另见 collective/icalendar#75 。
在一个同类项目里为了兼容这部分软件,我使用了以下 workaround 来把VALUE
去掉同时保留时区。
from icalendar import vDDDTypes
def add_datetime(component, name, time):
vdatetime = vDDDTypes(time)
if 'VALUE' in vdatetime.params and 'TZID' in vdatetime.params:
vdatetime.params.pop('VALUE')
component.add(name, vdatetime)
...
add_datetime(event, 'dtstart', event_start_datetime)
add_datetime(event, 'dtend', event_end_datetime)
VEVENT
中dtstamp
和uid
不可省略(https://icalendar.org/iCalendar-RFC-5545/3-6-1-event-component.html )(另见 zombie110year/cli_cqu#9 )TZID
涉及的时区需要有对应的VTIMEZONE
(https://icalendar.org/iCalendar-RFC-5545/3-2-19-time-zone-identifier.html )(另见 zombie110year/cli_cqu#11 )重庆大学研究生综合管理信息系统:http://mis.cqu.edu.cn/mis/
换了新的选课系统,用的是统一认证号了,失效了
Here are potential problems:
Maybe you can consider:
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.