Azure-Samples / Azure-Samples/msdocs-fastapi-postgresql-sample-app

Fail to run `python3 src/fastapi_app/seed_data.py` command

Đang mở
#4 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Bicep
Star
11
Fork
60
Merge trung bình
1 ngày 18 giờ
Pull request đã merge (30 ngày)
2

Mô tả

**Describe the issue:**
Running `python3 src/fastapi_app/seed_data.py` reports an error: cold not translate host name "", the. env file has not been configured correctly.
![image](https://github.com/user-attachments/assets/a646bdd9-8aa9-4eff-a676-d3abc464bcb2)
![image](https://github.com/user-attachments/assets/a4671ead-3b15-4509-bd57-327866baf6b5)

**Repro Steps:**

1. Fork this repository.
2. Open this repository from Codespace.
3. Run `cp .env.sample .env`.
4. Run `python3 -m pip install -r src/requirements.txt`.
5. Run `python3 -m pip install -e src`.
6. Run `python3 src/fastapi_app/seed_data.py`.

**Environment:**

- Azd version:`azd version 1.9.5 (commit cd2b7af9995d358aab33c782614f801ac1997dde)`
- OS: Windows 11

**Expected Behavior:**
Run `python3 src/fastapi_app/seed_data.py` successfully.

@bobtabor-msft and @hemarina for notification.

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

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

Hướng nghiên cứu

Bắt đầu với src/fastapi_app/seed_data.py và so sánh các cài đặt cơ sở dữ liệu bắt buộc với .env.sample và tệp .env đã sao chép. Xác minh cấu hình môi trường được lệnh seed sử dụng, sau đó chạy lại các bước cài đặt được liệt kê và xác nhận rằng python3 src/fastapi_app/seed_data.py hoàn tất thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
azure, fastapi, postgresql, python
Lĩnh vực
backend, cloud, databases
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

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.