๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • ๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป ๐ŸŒฎ ๐Ÿ’ฌ

๐Ÿ‘ฉ๐Ÿป‍๐Ÿ’ป32

[Airflow] RemovedInAirflow3Warning: Fetching SMTP credentials from configuration variables will be deprecated in a future release. Please set credentials using a connection instead. ๊ฐœ์š”airflow ์˜ฎ๊ธฐ๋Š” ์ž‘์—… ์ค‘์— error ๋ฐœ์ƒRemovedInAirflow3Warning: Fetching SMTP credentials from configuration variables will be deprecated in a future release. Please set credentials using a connection instead. ํ™•์ธ airflow ์ง„ํ–‰ ์‚ฌํ•ญ์„ ์ด๋ฉ”์ผ๋กœ ๋ฐ›๋Š”๋ฐ, ๊ทธ ์ด๋ฉ”์ผ ์ธ์ฆ ๊ด€๋ จํ•ด์„œ ์ƒ๊ธด ๋ฌธ์ œ## docker-compose.yaml# For SMTPAIRFLOW__SMTP__SMTP_HOST: smtp.gmail.comAIRFLOW__SMTP__SMTP_PORT: 587AIRFLOW__SMTP__SMTP_RETRY_LIMIT: 5AIRFLOW__SMTP__S.. 2024. 5. 29.
[python] TypeError: 'type' object is not subscriptable โœ… ๊ฐœ์š” python3.8 ํ™˜๊ฒฝ์—์„œ ์ฝ”๋“œ๋ฅผ ์‹คํ–‰์‹œํ‚ค๋‹ˆ ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ์™€ ํ•จ๊ป˜ ์‹คํ–‰์ด ์•ˆ๋˜์—ˆ๋‹คTypeError: 'type' object is not subscriptable ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” ์ง€์ ์„ ๋ณด๋‹ˆdef test_function1() -> list[str]: ... def test_function2() -> dict: ํƒ€์ž… ํžŒํŠธ๋ฅผ ์ง€์ •ํ•  ๋•Œ ์ƒ๊ธฐ๋Š” ์˜ค๋ฅ˜์›์ธ์„ ํ™•์ธํ•ด๋ณด๋‹ˆ, typing ํžŒํŠธ๋Š” python3.9๋ถ€ํ„ฐ ์ง€์›ํ•˜๊ณ  ์žˆ๋‹ค โœ… ๋ฐฉ๋ฒ• 1์‚ฌ์šฉํ•˜๋Š” python ์„ 3.9๋กœ ์—…๋ฐ์ดํŠธํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ๊ณ  โœ… ๋ฐฉ๋ฒ•2python typing ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ง€์ •ํ•ด์ฃผ๋ฉด ๋œ๋‹ค.python ๋ฒ„์ „ ์—…์€ ํฐ ๋ง˜ ๋จน๊ณ ํ•ด์•ผํ•˜๋‹ˆ ์ด ๋ฐฉ๋ฒ•์„ ๊ฐ•์ถ”ํ•œ๋‹ค.from typing import List, Dictdef test_.. 2024. 5. 2.
[Airflow] The scheduler does not appear to be running. Last heartbeat was received 7 hours ago.The DAGs list may not update, and new tasks will not be scheduled. ์ž˜ ์šด์˜๋˜๋˜ Airflow๊ฐ€ ๊ฐ‘์ž๊ธฐ ๋ฉˆ์ถ˜๊ฒƒ ๊ฐ™๋‹ค๋Š” ์–˜๊ธฐ๋ฅผ ๋“ฃ๊ณ  ๋ดค๋”๋‹ˆ ์—ฅ ~ ?? ๋‚ด DAG ๋“ค ๋‹ค ์˜ค๋””๊ฐ ?The scheduler does not appear to be running. Last heartbeat was received 7 hours ago.The DAGs list may not update, and new tasks will not be scheduled. >> ํ•ด์„์Šค์ผ€์ค„๋Ÿฌ๊ฐ€ ์‹คํ–‰ ์ค‘์ด ์•„๋‹Œ ๊ฒƒ ๊ฐ™์Œ. ๋งˆ์ง€๋ง‰์€ 7์‹œ๊ฐ„ ์ „์— ์ˆ˜์‹ ๋˜์—ˆ์Œ.DAG ๋ชฉ๋ก์ด ์—…๋ฐ์ดํŠธ๋˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ์œผ๋ฉฐ ์ƒˆ ์ž‘์—…์ด ์˜ˆ์•ฝ๋˜์ง€ ์•Š์Œ. Airflow ๊ธฐ๋Šฅ ์ค‘์— health ํ™•์ธํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ์–ด์„œ ํ•œ๋ฒˆ ์‚ฌ์šฉํ•ด๋ณด์•˜๋‹น/health health ํ•œ์ง€ unhealthy ํ•œ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. ์ง„์งœ ์ด์œ ๋Š” memory .. 2024. 3. 8.
[python] Received response with content-encoding: gzip, but failed to decode it. ์—๋Ÿฌ : Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect data check') res = requests.get( page_url, headers={ 'User-Agent': utils.get_random_agent() }, timeout=10 ) content = res.content ์œ„์™€ ๊ฐ™์ด ์š”์ฒญ์‹œ, ์•„๋ž˜์™€ ๊ฐ™์€ ๋ฉ”์„ธ์ง€์™€ ํ•จ๊ป˜ ํฌ๋กค๋ง์ด ์ง„ํ–‰์ด ๋ถˆ๊ฐ€ํ•œ ์ƒํ™ฉ์ด ๋ฐœ์ƒํ–ˆ๋‹ค. # error Received response with content-encoding: gzip, but failed to decode it.', error(.. 2024. 2. 19.
[python] ๋„ค์ด๋ฒ„ ์นดํŽ˜ ํฌ๋กค๋ง ๋„ค์ด๋ฒ„ ์นดํŽ˜ ๊ฒŒ์‹œ๊ธ€์„ ํฌ๋กค๋ง ํ•˜๋ ค ํ•œ๋‹ค. python requests๋ฅผ ์ด์šฉํ•ด์„œ ๊ฐ€์ง€๊ณ  ์˜ค๋ ค๊ณ  ํ–ˆ์œผ๋‚˜ ํšŒ์›๋‹˜์˜ ์•ˆ์ „ํ•œ ์„œ๋น„์Šค ์ด์šฉ์„ ์œ„ํ•ด ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ํ™•์ธํ•ด ์ฃผ์„ธ์š”. IP๊ฐ€ ์ž์ฃผ ๋ณ€๊ฒฝ๋˜๋Š” ๋„คํŠธ์›Œํฌ ํ™˜๊ฒฝ์—์„œ ๋กœ๊ทธ์ธํ•˜๋Š” ๊ฒฝ์šฐ IP๋ณด์•ˆ์„ ํ•ด์ œ ํ›„ ์ด์šฉํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค. ๋‹ค์‹œ ํ•œ๋ฒˆ ๋น„๋ฐ€๋ฒˆํ˜ธ ํ™•์ธ ํ•˜์‹œ๋ฉด ์ด์šฉ์ค‘์ธ ํ™”๋ฉด์œผ๋กœ ๋Œ์•„๊ฐ€๋ฉฐ, ์ž‘์„ฑ ์ค‘์ด๋˜ ๋‚ด์šฉ์„ ์ •์ƒ์ ์œผ๋กœ ์ „์†ก ๋˜๋Š” ๋“ฑ๋กํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ์ ‘๊ทผํ•  ์ˆ˜ ์—†์Œ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค. ์ด๋ ‡๊ฒŒ ๋˜๋ฉด selenium์„ ์ด์šฉํ•ด์„œ ๋™์ ์œผ๋กœ ์ ‘๊ทผํ•˜๊ธฐ๋กœ ํ•œ๋‹ค. ๋กœ๊ทธ์ธ id ์™€ password๋ฅผ ์ž…๋ ฅํ•ด์„œ ์•„๋ž˜์˜ ์ฝ”๋“œ๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ๋กœ๊ทธ์ธ์ด ์ง„ํ–‰๋จ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค. import time from selenium import webdriver import csv import pandas .. 2024. 1. 30.