new92 / IGFI

🤖 IGFI: Instagram Followers Increaser 📈 | Written in Python 🐍 | Don't forget to ⭐ the repo !
https://github.com/new92/IGFI
MIT License
177 stars 51 forks source link

I got this error on windows 11 #49

Open 6abr opened 6 months ago

6abr commented 6 months ago

I am using my windows 11 laptop and everything started working, but when I answered the last question I got this error message:

Traceback (most recent call last): File "C:\Users\Acer\Downloads\IGFI\scripts\igfi.py", line 659, in main(username=str(args.username).strip().lower(), sessionfile=str(args.sessionfile).replace('\', '/')) File "C:\Users\Acer\Downloads\IGFI\scripts\igfi.py", line 413, in main client.user_follow(users[NAMES[j]]) File "C:\Users\Acer\AppData\Local\Programs\Python\Python312\Lib\site-packages\instagrapi\mixins\user.py", line 735, in user_follow assert self.user_id, "Login required" AssertionError: Login required

C:\Users\Acer\Downloads\IGFI\scripts>

new92 commented 6 months ago

Hey @6abr is it the first time using IGFI ?

6abr commented 6 months ago

@new92 yes

6abr commented 6 months ago

Hello, I tried again on my kali linux virtual machine, but somehow I got the same error: Traceback (most recent call last): File "/home/bob/tools/IGFI/scripts/igfi.py", line 659, in , main(username-str(args.username).strip().lower(), sessionfile-str(args.sessionfile).replace File "/home/bob/tools/IGFI/scripts/igfi.py" arovh. line 413, in main client.user_follow(users[NAMES[j]]) File "/usr/local/lib/python3.11/dist-packages/instagrapi/mixins/user.py" line 735, in user_follow assert self.user_id, "Login required" AssertionError: Login required bob@ bob)-[~/tools/IGFI/scripts]

new92 commented 6 months ago

Ok that’s clearly a bug of IGFI let me fix it and I’ll get back to you.

new92 commented 6 months ago

Hey @6abr I made some changes and hopefully fixed the bug. It should be running just fine now. So try it and let me know

6abr commented 6 months ago

Hello @new92 , Maybe, i am doing something wrong. I am on Kali linux VM and I got this error. btw i dont know if that is matter, but i can see a consent.txt file but when i used the cat cmd to it, it didnt show anything. I tried with my windows 11 laptop and i got the same error

Traceback (most recent call last):
File "/home/bob/tools/IGFI/scripts/igfi.py", line 688, in
main(username=str(args.username).strip().lower(), password=str(args.password).strip(), session=str(args.session).replace('\', '/')) if args.session is not None else main(username=str(args.username).strip().lower(), password=str(args.password).strip(), session='')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bob/tools/IGFI/scripts/igfi.py", line 316, in main
if os.stat('./files/consent.txt').st_size == 0:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: './files/consent.txt'

new92 commented 6 months ago

@6abr ok try running IGFI from the IGFI directory not the scripts folder if you're doing so. What I would recommend is to make sure to follow the instructions on the README file. I'll review again the code but try the above method and let me know 👍

6abr commented 6 months ago

@new92 sorry for bother you, I got this error. tell me thats my fault. error: Traceback (most recent call last):
File "/home/bob/tools/IGFI/./scripts/igfi.py", line 688, in
main(username=str(args.username).strip().lower(), password=str(args.password).strip(), session=str(args.session).replace('\', '/')) if args.session is not None else main(username=str(args.username).strip().lower(), password=str(args.password).strip(), session='')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bob/tools/IGFI/./scripts/igfi.py", line 328, in main
logging.basicConfig(
File "/usr/lib/python3.11/logging/init.py", line 2050, in basicConfig
h = FileHandler(filename, mode,
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/logging/init.py", line 1181, in init
StreamHandler.init(self, self._open())
^^^^^^^^^^^^
File "/usr/lib/python3.11/logging/init.py", line 1213, in _open
return open_func(self.baseFilename, self.mode,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/home/bob/tools/IGFI/files/consent.txt'

new92 commented 6 months ago

Hey @6abr don't worry about it, ok to resolve this issue try running IGFI using root access.

6abr commented 6 months ago

Dear @new92 I am so sorry for bothering you so many times. I have been struggling to run this script successfully but I can't do it. I got a problem again. You advised me to run the script with root access but it got my attention, if I run the script with root access, it doesn't find the session file, so I run the cookies.py with root access to get the session file, but if I run cookies.py with root then it doesn't find the cookies.sqlite file so I don't get the session file it means I can't run the igfi.py, and if I run the script without root access, I get the previous error, so tell me, what am I doing wrong.

new92 commented 6 months ago

Hey @6abr really don't worry about it. Why when running IGFI with root access it's unable to locate the session file ? Do you specify the file path using the --session option in the terminal / command line ? Oh I see the issue now, so you don't need to run the cookies.py file using root access, only the igfi.py script. So try using this method and let me know 👍

6abr commented 6 months ago

Hey @new92 , its me again. When I run igfi.py from the igfi directory with root, it cant find the session but when i navigate to the directory where is the session i clearly see the session file, so i dont understand why it cant find it.

new92 commented 6 months ago

Hi @6abr can you send me a sceenshot of the complete error message ? I really can't understand why igfi is unable to find the session file. My email address is: new92github@gmail.com

6abr commented 4 months ago

hey! erorr on windows 11. any solution?

Traceback (most recent call last): File "C:\Users\Acer\AppData\Local\Programs\Python\Python312\Lib\site-packages\instagrapi\mixins\private.py", line 298, in _send_private_request response.raise_for_status() File "C:\Users\Acer\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/accounts/login/

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Acer\Downloads\IGFI\igfi.py", line 646, in main(username=args.username.strip().lower(), password=args.password.strip(), session=args.session.replace('\', '/')) File "C:\Users\Acer\Downloads\IGFI\igfi.py", line 347, in main login = client.login(username, password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Acer\AppData\Local\Programs\Python\Python312\Lib\site-packages\instagrapi\mixins\auth.py", line 391, in login logged = self.private_request("accounts/login/", data, login=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Acer\AppData\Local\Programs\Python\Python312\Lib\site-packages\instagrapi\mixins\private.py", line 445, in private_request raise e File "C:\Users\Acer\AppData\Local\Programs\Python\Python312\Lib\site-packages\instagrapi\mixins\private.py", line 432, in private_request self._send_private_request(endpoint, kwargs) File "C:\Users\Acer\AppData\Local\Programs\Python\Python312\Lib\site-packages\instagrapi\mixins\private.py", line 354, in _send_private_request raise UnknownError(last_json) instagrapi.exceptions.UnknownError: You'll need to update Instagram to the latest version before you can use the app.

new92 commented 4 months ago

Hey @6abr oh I see, that's a strange one. Well if you're using an older version of the Instagram app try updating it. Otherwise try re-installing IGFI. If that doesn't work also try rebooting your device and/or your wifi (disable it wait for a couple of seconds and enable it again).

Akkiii commented 3 months ago

image1 I am facing this error.... I have re-install IGFI as well.

new92 commented 3 months ago

@Akkiii To avoid this error login to Instagram from Firefox, run the cookies.py script and then execute the igfi.py one.

Akkiii commented 3 months ago

Still I am getting the same error.... as I have followed your mentioned steps

new92 commented 3 months ago

Ok, let's see, so the correct installation steps are these:

sudo su
git clone https://github.com/new92/IGFI
cd IGFI
sudo pip install -r ./files/requirements.txt
python3 ./cookies.py
python3 ./igfi.py -u <username> -p <password> --session <path_to_session_file>

The session file will be generated when running the cookies.py script so make sure to copy the path generated. And paste it in the --session . Make sure that you've followed all these steps berofe running igfi.py

aditya-kumar-129 commented 3 months ago

@new92 Do we need to replace the path_to_session_file with some other thing in the below command:- python3 ./igfi.py -u -p --session

If we don't need to put anything then you can mention it in the readme file. May be some comments like in place of userName place your userName etc. That could be better.

aditya-kumar-129 commented 3 months ago

Also, I executed the window commands that you mentioned in the ReadMe file I got the below error when I ran cookie.py C:\Users\myuserName\Desktop\IGFI>python3 cookies.py Using cookies from C:\Users\userName/AppData/Roaming/Mozilla/Firefox/Profiles\w8riq4h2.default\cookies.sqlite. Cookie import failed: no such table: moz_cookies

Even though I logged in to the Instagram in the firefox browser. It would be better if you simply make a unlisted video and put the link here/ReadMe

new92 commented 3 months ago

Hey @aditya-kumar-129 ok thanks for mentioning these issues. Although I can't locate the "python3 ./igfi.py -u -p --session " you're talking about. The command which appears on the README I see in all installation guides is the "python3 ./igfi.py -u -p --session ". To answer your question, you replace the with the path generated from the "python3 ./cookies.py" command. As for the error you're encountering to be honest, it's the first time I see an error with such message. However you can try the following steps:

aditya-kumar-129 commented 3 months ago

@new92 Regarding the above quote I installed Firefox for the first time on my machine.

Actually, I also tried in the Ubuntu terminal on my Windows machine by installing the ubuntu. In that when I run the below command then I get the below error:- python3 ./cookies.py No Firefox cookies.sqlite file found. Use -c COOKIEFILE.

I tried to solve the error and at one place I got that I need to include the path to the cookies file using the -c command So run the below command and then also I am getting the below error:- python3 ./cookies.py -c "C:\Users\userName\AppData\Roaming\Mozilla\Firefox\Profiles\w8riq4h2.default\cookies.sqlite" Using cookies from C:\Users\UserName\AppData\Roaming\Mozilla\Firefox\Profiles\w8riq4h2.default\cookies.sqlite. Cookie import failed: no such table: moz_cookies

I don't know what exactly is the issue. If you could help me it would be greatful.

aditya-kumar-129 commented 3 months ago

@new92 I can also try some manual steps by putting the cookie manually in the file If you could just tell me which cookie I need to put.

new92 commented 3 months ago

Hey @aditya-kumar-129 are you logged in to your Instagram account from Firefox ?

aditya-kumar-129 commented 3 months ago

Yup.

On Wed, 20 Mar, 2024, 11:10 pm Spiros Panagiotou, @.***> wrote:

Hey @aditya-kumar-129 https://github.com/aditya-kumar-129 are you logged in to your Instagram account from Firefox ?

— Reply to this email directly, view it on GitHub https://github.com/new92/IGFI/issues/49#issuecomment-2010201064, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATQYCDH52TUGLPUAS2XMUVTYZHCYZAVCNFSM6AAAAABBIVGGQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJQGIYDCMBWGQ . You are receiving this because you were mentioned.Message ID: @.***>

new92 commented 3 months ago

Ok, check if Instagram locked your account temporarily and you need to follow a verification process. Check also these issues maybe they'll offer a better solution.

aditya-kumar-129 commented 3 months ago

I can use Instagram properly so yeah it's not blocked.(temporary block) I checked the links The first one does not have a solution although they have the same issue. For the second one, I am not able to get what exactly they talked about because in the beginning it was related to the error and i think then the topic changed as much as I can understand from the conversations.

Just have one question that do we need any kind of webdriver also for firefox??

On Wed, Mar 20, 2024 at 11:52 PM Spiros Panagiotou @.***> wrote:

Ok, check if Instagram locked your account temporarily and you need to follow a verification process. Check also these issues maybe they'll offer a better solution.

— Reply to this email directly, view it on GitHub https://github.com/new92/IGFI/issues/49#issuecomment-2010310558, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATQYCDDJ4GYSYQJKLFWGFL3YZHHXBAVCNFSM6AAAAABBIVGGQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJQGMYTANJVHA . You are receiving this because you were mentioned.Message ID: @.***>

new92 commented 3 months ago

Ok so the error is originated from the Firefox browser. More specifically, Firefox must have changed their database columns which leads to the specific error. In order to resolve this issue you have to install a compatible with the script version of Firefox. That would be 78.x

So uninstall the current version of Firefox and install the 78.x one.

To answer your question, no it's not necessary to install Firefox's webdriver.