ft-webhook-to-discord's Issues
begin_at, end_atをfromisoformat()する時ValueError
Traceback
Traceback (most recent call last):
File "/var/task/src/message.py", line 19, in on_ready
embed = create_event_embed(body)
File "/var/task/src/message.py", line 40, in create_event_embed
begin_at = _get_local_timestr(event["begin_at"])
File "/var/task/src/message.py", line 73, in _get_local_timestr
date = _from_iso8601_str(timestr).astimezone(jst)
File "/var/task/src/message.py", line 89, in _from_iso8601_str
d = datetime.fromisoformat(time_str)
ValueError: Invalid isoformat string: '2021-02-18 10:00:00 UTC'
原因
日付文字列に UTC
が含まれているため。
対処
UTC以外のtimezoneになる可能性があるか確認し、ならなければUTC削除で対処。
可能性があれば、timezone変換用のライブラリ導入(Python3.8ではzoneinfoが使えないため)して、timezoneをparseする。
水平展開
取得するデータで、42 APIと異なるデータがないか確認する。
key | OK/NG |
---|---|
name | OK |
begin_at | 本Issueで修正 |
end_at | 本Issueで修正 |
max_people | OK |
location | OK |
kind | OK |
id | OK |
description | OK |
GitHub Actionsを使ってdev, prod環境へデプロイする
- masterへpush: prod環境へデプロイ
- devへpush: dev環境へデプロイ
campus_id, cursus_id, headerのeventタイプでfilteringすべきか調査
- Webhookからのデータを集める
- 不要なデータが入ってるか見る
- 入ってたらfilteringする
discord.py v2対応
2023年初めにdiscord.py v1で使われているAPIが廃止されるため、その前にv2対応しましょう。
ランタイムがOct 14, 2024にdeprecatedになる
現在のランタイムはPython3.8
Oct 14, 2024に非推奨になる
参考:Lambda runtimes - AWS Lambda
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.