Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

예치금 조회 기능 오류 #107

Closed
an14700 opened this issue Mar 5, 2024 · 5 comments
Closed

예치금 조회 기능 오류 #107

an14700 opened this issue Mar 5, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@an14700
Copy link
Contributor

an14700 commented Mar 5, 2024

dhapi show-balance 명령어로 예치금을 조회하면 다음과 같이 오류가 발생합니다.
tomli.TOMLDecodeError: Invalid value (at line 2, column 12)

trace 로그를 보면 구매불가능금액을 처리하던 중 오류가 발생한 것 같습니다.
Traceback (most recent call last): File "/Users/name/WorkSpace/PythonProjects/lottery/.venv/lib/python3.12/site-packages/dhapi/port/lottery_client.py", line 186, in show_balance 구매불가능금액 = self._parse_digit(elem.select("td.ta_right")[6].contents[0]) # (예약구매금액 + 출금신청중금액)

버전은 4.0.2 버전을 사용했습니다.

좋은 기능 만들어주셔서 매주 잘 사용하고 있습니다.
감사합니다.

an14700 added a commit to an14700/dhlottery-api that referenced this issue Mar 5, 2024
@roeniss
Copy link
Owner

roeniss commented Mar 5, 2024

잘 사용해주셔서 감사합니다. 정말 기분이 좋네요.

제가 (실제로) 구매불가능금액 이 0 이라서... 체크가 부족했네요. 올려주신 PR 확인해보겠습니다.

@roeniss
Copy link
Owner

roeniss commented Mar 5, 2024

@an14700 흠. 4.0.2 버전으로 정상적인 결과를 확인했습니다.

$ dhapi show-balance
✅ 예치금 현황을 조회했습니다.
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓
┃ 총예치금  ┃ 구매가능금액 ┃ 예약구매금액 ┃ 출금신청중금액 ┃ 구매불가능금액 ┃ 이번달누적구매금액 ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩
│ 15,000 원 │ 5,000 원     │ 5,000 원     │ 5,000 원       │ 10,000 원      │ 5,000 원           │
└───────────┴──────────────┴──────────────┴────────────────┴────────────────┴────────────────────┘
(구매불가능금액 = 예약구매금액 + 출금신청중금액)
$ dhapi version
┏━━━━━━━━━━┓
┃ 현재버전 ┃
┡━━━━━━━━━━┩
│ 4.0.2    │
└──────────┘

이 상황을 설명하기 위해서, 저와 an14700 님의 UI 가 다르다는 가설을 세웠습니다.

제 화면은 아래와 같은데, 혹시 다른 부분이 있는지요?

Screenshot 2024-03-06 at 02 58 31 by seonghyeok

제 짐작으로는 총 예치금 아래쪽이 조금 다르게 생겼을 것 같습니다.

@an14700
Copy link
Contributor Author

an14700 commented Mar 5, 2024

말씀하신 것처럼 다르게 생겼네요. 저는 간편충전계좌를 설정하지 않았습니다.
스크린샷 2024-03-06 오전 7 11 11

@roeniss
Copy link
Owner

roeniss commented Mar 6, 2024

@an14700 그럼 여기 분기가 있어야 할 것 같습니다. 해당 내용은 PR 에서 마저 진행하겠습니다.

an14700 added a commit to an14700/dhlottery-api that referenced this issue Mar 6, 2024
an14700 added a commit to an14700/dhlottery-api that referenced this issue Mar 10, 2024
@an14700
Copy link
Contributor Author

an14700 commented Mar 10, 2024

감사합니다.

@an14700 an14700 closed this as completed Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants