Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Python versions are not floats #1428

Open
1 task done
ole-tange opened this issue May 26, 2022 · 1 comment
Open
1 task done

Python versions are not floats #1428

ole-tange opened this issue May 26, 2022 · 1 comment

Comments

@ole-tange
Copy link

ole-tange commented May 26, 2022

Initial Check

If the issue is a request please specify that it is a request in the title (Example: [REQUEST] more features). If this is a question regarding 'twint' please specify that it's a question in the title (Example: [QUESTION] What is x?). Please only submit issues related to 'twint'. Thanks.

Make sure you've checked the following:

  • [] Python version is 3.6; (No: this is the core issue)
  • [] Updated Twint with pip3 install --user --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint; (Used source from GIT).
  • I have searched the issues and there are no duplicates of this issue/question/request.

Command Ran

Please provide the exact command ran including the username/search/code so I may reproduce the issue.

~/twint/bin/twint -u foo
[-] TWINT requires Python version 3.6+.

Description of Issue

Please use as much detail as possible.

Version 3.10 is considered < 3.6.

Environment Details

Using Windows, Linux? What OS version? Running this in Anaconda? Jupyter Notebook? Terminal?

Linux.

The problem is here:

def run_as_command():
    version = ".".join(str(v) for v in sys.version_info[:2])
    if float(version) < 3.6:
        print("[-] TWINT requires Python version 3.6+.",version)
        sys.exit(0)

You cannot treat versions as floats (3.10 is bigger than 3.6)

@julian-atlasovich-iris
Copy link

julian-atlasovich-iris commented May 30, 2022

Known issue, we are still waiting for a permanent fix. Please refer to these links for a temporary fix
#1344, #1346, #1313

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants