Найти - Пользователи
Полная версия: Cannot find reference 'QRCode' in '__init__.pyi'
Начало » Python для новичков » Cannot find reference 'QRCode' in '__init__.pyi'
1
Arabastft
import qrcode

url = "https://www.facebook.com

file_path = ”C:\\Users\\hello\\Desktop\\qrcode.png“

qr = qrcode.QRCode()
qr.add_data(url)

img = qr.make()
img.save(file_path)

print(”QR Code was generated!")

В чем проблема?
cleatscoverage
Arabastft
import qrcode

url = "https://www.facebook.com

file_path = ”C:\\Users\\hello\\Desktop\\qrcode.png“

qr = qrcode.QRCode()
qr.add_data(url)

img = qr.make()
img.save(file_path)

print(”QR Code was generated!")

В чем проблема? drift boss
Скорее всего IDE/анализатор кода просто не видит типы в модуле qrcode. Сам код выглядит правильным — он создаёт и сохраняет QR‑код. Попробуйте установить пакет qrcode и убедиться, что вы запускаете скрипт в той же среде, где установлен модуль.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB