MPCodeWriter21 / whois21

whois21 is a simple and easy to use python package that lets you easily query whois information of a domain/IP.
Apache License 2.0
26 stars 1 forks source link

module 'typing' has no attribute '_LiteralGenericAlias' #6

Closed Yang-ST closed 11 months ago

Yang-ST commented 11 months ago

Hello, my programming environment is as follows: python: 3.7.9 typing-extensions: 4.7.0

But I can't use whois21.Can you tell me about your version of typing_extensions? or a requirements.txt.Thank you

MPCodeWriter21 commented 11 months ago

Hello,

Thank you for reaching out. It seems the issue you're experiencing is due to using Python 3.7.9, but whois21 only supports Python versions 3.8 and above. Additionally, whois21 does not require typing-extensions as a dependency.

To clarify:

  1. Make sure you're using Python 3.8 or a higher version.
  2. The requirements for whois21 are listed in the README.md and specified in the pyproject.toml file. When you install whois21 using pip, it will automatically handle the dependencies.

Please ensure that you include the complete error message and the command you ran in future issue reports. This will help us provide more accurate assistance.

I recommend upgrading to the latest version of whois21 to take advantage of the latest features and improvements. You can do this with the following command:

pip install --upgrade whois21

If you have any more questions or encounter any issues, feel free to ask.

Yang-ST commented 11 months ago

Sorry, it's my fault. This error is due to the use of log21, which uses typing-extensions, and when I comment out the reference to it, whois21 works fine.

MPCodeWriter21 commented 11 months ago

Thank you for the update. It's worth noting that log21 doesn't have a dependency on typing-extensions either. The error you encountered is probably related to importing an object from the core typing module that may not be available in your Python version.

To ensure smooth compatibility and access to the latest features, it's advisable to upgrade your Python version to 3.8 or higher if you intend to use whois21. Additionally, I recommend checking for updates to log21 as this issue is resolved in its latest version.

Your active participation and understanding are greatly appreciated. If you have any further questions or encounter any issues, please don't hesitate to reach out.