Instapy: TypeError: not all arguments converted during string formatting

Created on 19 Dec 2017  路  5Comments  路  Source: timgrossmann/InstaPy

I've chcked the output of InstaPy and found an error message in there:

WARNING - Post Randomly Skipped...

Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 859, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 732, in format
    return fmt.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 471, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 335, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file instapy.py, line 1314
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 859, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 732, in format
    return fmt.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 471, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 335, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file instapy.py, line 1314

Most helpful comment

All 5 comments

hey @TR0X , what's your config (quickstart.py) ?

Attached:

insta_username = '**************'
insta_password = '**************'
session = InstaPy(username=insta_username, password=insta_password, use_firefox=True, nogui=True)
session.login()
session.set_do_comment(True, percentage = 25)
session.set_comments(['Beautiful ! :)', 'Pretty! :D', 'Great photo'])
session.like_by_locations(['262309028/austria', '63134088/vienna-austria', '213933962/zermatt-switzerland'], amount=50)
session.follow_user_followers(['sonyalpha', 'kai.boet', 'menschfotograf'], amount=10, randomize=True)
session.unfollow_users(amount=10, onlyInstapyFollowed = True, onlyInstapyMethod = 'FIFO')
session.set_user_interact(amount=3, randomize=True, percentage=50, media='Photo')
session.set_do_like(enabled=True, percentage=75)
session.set_comments(["Great!", "Nice one!"])
session.set_do_comment(enabled=True, percentage=10)
session.interact_user_followers(['thorstenovergaard', 'sonyalpha', 'menschfotograf', 'kai.boet', 'stephanwiesner', 'brahmino', 'macenzo', 'janske'], amount=60, random=True)
session.like_by_tags(['streetphotography', 'travelgram', 'macro', 'bokeh', 'architecture', 'photography', 'sunset', 'mountains', 'colors'], amount=55, media='Photo')
session.like_by_feed(amount=100, randomize=True, interact=True)

is that the full stack trace (error message) ? Can't find where InstaPy raised it

Hi! It seems so:

WARNING - Post Randomly Skipped...

INFO - Total of links feched for analysis: 1
INFO - ~~~~~~~~~~~~~~~~~~~~~~~~~~~
INFO - ~~~~~~~~~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 859, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 732, in format
    return fmt.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 471, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 335, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file instapy.py, line 1314
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 859, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 732, in format
    return fmt.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 471, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 335, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file instapy.py, line 1314
INFO - Total of links feched for analysis: 1
INFO - ~~~~~~~~~~~~~~~~~~~~~~~~~~~
INFO - ~~~~~~~~~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 859, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 732, in format
    return fmt.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 471, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 335, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file instapy.py, line 1314
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 859, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 732, in format
    return fmt.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 471, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 335, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file instapy.py, line 1314
INFO - Total of links feched for analysis: 1
INFO - ~~~~~~~~~~~~~~~~~~~~~~~~~~~
INFO - ~~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING - Post Randomly Skipped...

INFO - Total of links feched for analysis: 1
INFO - ~~~~~~~~~~~~~~~~~~~~~~~~~~~
INFO - ~~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING - Post Randomly Skipped...

I took a look in at the line 1314 in instapy.py:

self.logger.info('This link has already '
                                         'been visited:\n', link, '\n')

My Python skills are not the best, but imho it is not allowed to insert two strings in one logger message... (?)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rahulkapoor90 picture rahulkapoor90  路  3Comments

ingorichter picture ingorichter  路  3Comments

tibor picture tibor  路  3Comments

n0sw34r picture n0sw34r  路  3Comments

CodeMaster1 picture CodeMaster1  路  3Comments