This error seems like is intermittent, happens from time to time. But not always.
First run:
root@<machine>:~/InstaPy# python3 <file_name>.py
WARNING [2018-08-01 07:53:25] [<username>] Heeh! Error occured while getting a DB profile for 'None':
b'NOT NULL constraint failed: profiles.name'
Traceback (most recent call last):
File "<file_name>.py", line 24, in <module>
multi_logs=True)
File "/root/InstaPy/instapy/instapy.py", line 192, in __init__
get_db(True)
File "/root/InstaPy/instapy/database_engine.py", line 75, in get_db
id = get_profile(name, address, logger) if (id is None or make==True) else id
File "/root/InstaPy/instapy/database_engine.py", line 110, in get_profile
profile = dict(profile)
TypeError: 'NoneType' object is not iterable
Second run:
root@<machine>:~/InstaPy# python3 <file_name>.py
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2018-08-01 07:53:29] [<username>] Session started!
Run python file with actions
Intermitent error
WARNING [2018-08-01 07:53:25] [<username>] Heeh! Error occured while getting a DB profile for 'None':
b'NOT NULL constraint failed: profiles.name'
Reverted my local repo to commit 0ab19ddd5775e0d194e6426560ff52892c1e519f.
No errors anymore.
So I think the problem may be after that commit?
Same issue here.
Forwarded to 99cf2b01e68cb28e07eb8f708afe14cc1ce445c0 and problem is not occuring
Last working commit:
commit 99cf2b01e68cb28e07eb8f708afe14cc1ce445c0
Author: meinert <[email protected]>
Date: Mon Jul 30 10:20:06 2018 +0200
Changed XPATH other place
Had to cherry pick bc6983b203e462a8cd5d9a050f81f54de9201d9e and 1587095abeb66dbcd7dd385155444e246deb185f in order to get it working back again.
Revert @uluQulu commits on Dedicated Data Base to provide robust 'record activity' and 'follow restriction' and support future DB operations easily also worked.
@rafaelfcsouza quick fix for it , on database_engine.py in line 3 add import time and in line 83 add time.sleep(2)
import os
import sqlite3
import time
from .settings import Settings
def get_profile(name, address, logger):
time.sleep(2)
""" Get a profile for users and return its id """
try:
@Mehran Not working for me, still have the issue.
Still happens when I follow "run in Docker" guide
Having same issue when following "Running with Docker microservices manual"
I was getting the same error on Mac using python3.7.
It turns out for me that the problem was that I was getting insta_username with os.environ.get('IG_BOT_USER') and for some reason insta_username was None.
I fixed it by hardcoded the username before setting the workspace. Hope it helps
Most helpful comment
Having same issue when following "Running with Docker microservices manual"