Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

JSON serialization exception when creating PlannerTask

Đang mở
#534 3 bình luận 0 reaction 1 người được giao Xem trên GitHub

@rkodev đang làm issue này rồi.

Từ ngày 12/7/2024.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Needs: Attention :wave:

Sample Python code from this documentation page does not work if any of datetime-typed fields initialized.
Exception with message Object of type DateTime is not JSON serializable is thrown.

Non-working code:

graph_client = GraphServiceClient(credentials, scopes)

request_body = PlannerTask(
	plan_id = "xqQg5FS2LkCp935s-FIFm2QAFkHM",
	bucket_id = "hsOf2dhOJkqyYYZEtdzDe2QAIUCR",
	title = "Update client list",
	assignments = PlannerAssignments(
		additional_data = {
				"fbab97d0-4932-4511-b675-204639209557" : {
						"@odata_type" : "#microsoft.graph.plannerAssignment",
						"order_hint" : " !",
				},
		}
	),
	due_date_time = datetime(2023, 12, 31)         
)

result = await graph_client.planner.tasks.post(request_body)
Ngôn ngữ chính
Python
Star
630
Fork
96
Merge trung bình
15 giờ 20 phút
Pull request đã merge (30 ngày)
3

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoftgraph/msgraph-sdk-python

Tất cả issue của microsoftgraph/msgraph-sdk-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.