ohld / igbot

🐙 Free scripts, bots and Python API wrapper. Get free followers with our auto like, auto follow and other scripts!
https://hikerapi.com/p/N2P6iqiM
Apache License 2.0
4.72k stars 1.47k forks source link

[BUG] challenge_required with send_photo method #1363

Open b177y opened 4 years ago

b177y commented 4 years ago

Example file

Describe the bug

Attempting to send image over dm using bot.send_photo([userid], filepath), it returns a 400 error and says challenge required.

Log

>>> bot.send_photo(['IDNUM'], "FILEPATH")
2020-03-15 16:43:03,392 - ERROR - Request returns 400 error!
2020-03-15 16:43:03,392 - INFO - Instagram's error message: challenge_required
2020-03-15 16:43:03,392 - INFO - Instagram's error message: {}
2020-03-15 16:43:03,392 - INFO - Message to ['196029714'] wasn't sent
False

To Reproduce

Steps to reproduce the behavior:

  1. Run import instabot
  2. Run bot = instabot.Bot()
  3. Run bot.login()
  4. Choose logged in user
  5. Run bot.send_photo(['IDNUM'], "FILEPATH")

Expected behavior

The jpg image at FILEPATH should be sent to the user with id of IDNUM

Additional context I don't have 2fa so the challenge shouldn't be a 2fa challenge. Login is always successful.

Version

Python version (python -v): Python 3.8.1

Operating Systeem: Win/Linux/MacOS: Manjaro Linux

close-issue-app[bot] commented 4 years ago

The app gets an error. :(

      bad indentation of a sequence entry at line 22, column 2:
     - content:
     ^
      YAMLException: bad indentation of a sequence entry at line 22, column 2:
     - content:
     ^
    at generateError (/app/node_modules/js-yaml/lib/js-yaml/loader.js:167:10)
    at throwError (/app/node_modules/js-yaml/lib/js-yaml/loader.js:173:9)
    at readBlockSequence (/app/node_modules/js-yaml/lib/js-yaml/loader.js:962:7)
    at composeNode (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1390:45)
    at readBlockMapping (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1089:11)
    at composeNode (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1359:12)
    at readDocument (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1519:3)
    at loadDocuments (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1575:5)
    at load (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1596:19)
    at Object.safeLoad (/app/node_modules/js-yaml/lib/js-yaml/loader.js:1618:10)
    at Object.parseConfig (/app/dist/parser.js:16:21)
    at /app/dist/robot.js:73:39
    at step (/app/dist/robot.js:33:23)
    at Object.next (/app/dist/robot.js:14:53)
    at fulfilled (/app/dist/robot.js:5:58)
duplicate-issues[bot] commented 4 years ago

Hey @b177y,

We did a quick check and this issue looks very darn similar to

This could be a coincidence, but if any of these issues solves your problem then I did a good job :smile:

If not, the maintainers will get to this issue shortly.

Cheers, Your Friendly Neighborhood ProBot

Laeka commented 4 years ago

Same issue here 2020-03-16 06:31:58,441 - INFO - Not yet logged in starting: PRE-LOGIN FLOW! 2020-03-16 06:32:00,329 - ERROR - Request returns 400 error! 2020-03-16 06:32:00,329 - INFO - Instagram's error message: challenge_required 2020-03-16 06:32:00,329 - INFO - Error type: checkpoint_challenge_required 2020-03-16 06:32:00,331 - WARNING - NO MORE PHOTO TO UPLOAD

jephjohnson commented 4 years ago

Same Issue:

2020-04-05 16:23:58,372 - INFO - Not yet logged in starting: PRE-LOGIN FLOW!
2020-04-05 16:24:00,512 - ERROR - Request returns 400 error!
2020-04-05 16:24:00,513 - INFO - Instagram's error message: challenge_required
2020-04-05 16:24:00,513 - INFO - Error type: checkpoint_challenge_required
2020-04-05 16:24:00,513 - INFO - Going to like media with hashtag #fashion.
tambu22 commented 4 years ago

Same!