Legrandin / pycryptodome

A self-contained cryptographic library for Python
https://www.pycryptodome.org
Other
2.74k stars 492 forks source link

"AES" is unknown import symbolPylancereportGeneralTypeIssues (import) AES: Unknown #793

Closed irajeshh closed 6 months ago

irajeshh commented 6 months ago

"AES" is unknown import symbolPylance. image

I tried to import AES, but the below error is showing. image

I tried both Crypto & Cryptodome but none of them are having the definition _create_cipher. Also I tried to test importing DES..etc each file shows the same _create_cipher file error.

I'm completely new for python and not sure abt to install any extra support dependencies are to be included!

os: macOS 14.0 python: 3.12.0

Varbin commented 6 months ago

Does your code run or is this just a report by Pylance?

irajeshh commented 6 months ago

@Varbin No it doesnt allow to run the code image image

Varbin commented 6 months ago

The code should be:

from Cryptodome.Cipher import AES

and not

from Cryptodome.Cipher.AES import AES

Am 1. Januar 2024 12:31:17 MEZ schrieb Rajesh @.***>:

@Varbin No it doesnt allow to run the code image image

-- Reply to this email directly or view it on GitHub: https://github.com/Legrandin/pycryptodome/issues/793#issuecomment-1873287187 You are receiving this because you were mentioned.

Message ID: @.***>

irajeshh commented 6 months ago

🥲 Pardon! I didn't expected this to end like this (😂). closing the issue.