InstaPy / instapy-quickstart

💨 Simply get InstaPy up and running in minutes.
GNU General Public License v3.0
765 stars 796 forks source link

fresh install => Traceback issue, SystemError: Parent module '' not loaded #187

Closed filipstrapinadotcz closed 3 years ago

filipstrapinadotcz commented 4 years ago

Hello, I just did a fresh installation of Instapy on Ubuntu (I tried it on different versions from 16 to 20) and I still receive the same error:

[root@Instabot:/usr/local/lib/python3.5/dist-packages/instapy# python3 quickstart.py
Traceback (most recent call last):
  File "quickstart.py", line 2, in <module>
    from instapy import InstaPy
  File "/usr/local/lib/python3.5/dist-packages/instapy/instapy.py", line 20, in <module>
    from . import __version__
SystemError: Parent module '' not loaded, cannot perform relative import

my quickstart.py for testing is set up like

# imports
from instapy import InstaPy
from instapy import smart_run

# login credentials
insta_username = 'myusernameIwontshare'
insta_password = 'mypasswordIwontshare'

# get an InstaPy session!
# set headless_browser=True to run InstaPy in the background
session = InstaPy(username=insta_username,
                  password=insta_password,
                  headless_browser=True)

with smart_run(session):
  """ Activity flow """

  # activity            
  session.like_by_tags(["natgeo"], amount=10)

file access rights are set like this

[root@Instabot:/usr/local/lib/python3.5/dist-packages/instapy# ls -la
total 664
drwxr-sr-x  6 root staff   4096 Sep 18 15:12 .
drwxrwsr-x 71 root staff   4096 Sep 18 14:17 ..
-rw-r--r--  1 root staff   9934 Sep 18 14:17 browser.py
-rw-r--r--  1 root staff   8849 Sep 18 14:17 clarifai_util.py
-rw-r--r--  1 root staff  15310 Sep 18 14:17 commenters_util.py
-rw-r--r--  1 root staff  14461 Sep 18 14:17 comment_util.py
-rw-r--r--  1 root staff    141 Sep 18 14:17 constants.py
-rw-r--r--  1 root staff   5678 Sep 18 14:17 database_engine.py
-rw-r--r--  1 root staff   1475 Sep 18 14:17 event.py
-rw-r--r--  1 root staff    104 Sep 18 14:17 exceptions.py
-rw-r--r--  1 root staff   1324 Sep 18 14:17 feed_util.py
-rw-r--r--  1 root staff   6043 Sep 18 14:17 file_manager.py
drwxr-sr-x  2 root staff   4096 Sep 18 14:17 firefox_extension
drwxr-sr-x  5 root staff   4096 Sep 18 14:17 icons
-rw-r--r--  1 root staff    280 Sep 18 14:17 __init__.py
-rw-r--r--  1 root staff 222821 Sep 18 14:17 instapy.py
-rw-r--r--  1 root staff  34398 Sep 18 14:17 like_util.py
-rw-r--r--  1 root staff  16712 Sep 18 14:17 login_util.py
-rw-r--r--  1 root staff    600 Sep 18 14:17 monkey_patcher.py
drwxr-sr-x  3 root staff   4096 Sep 18 14:17 plugins
-rw-r--r--  1 root staff   7089 Sep 18 14:17 pods_util.py
-rw-r--r--  1 root staff   4848 Sep 18 14:17 print_log_writer.py
drwxr-sr-x  2 root staff   4096 Sep 18 14:17 __pycache__
-rw-r--r--  1 root staff    544 Sep 18 15:05 quickstart.py
-rw-r--r--  1 root staff  14094 Sep 18 14:17 quota_supervisor.py
-rw-r--r--  1 root staff  42312 Sep 18 14:17 relationship_tools.py
-rw-r--r--  1 root staff   2497 Sep 18 14:17 settings.py
-rw-r--r--  1 root staff   8142 Sep 18 14:17 story_util.py
-rw-r--r--  1 root staff  19687 Sep 18 14:17 text_analytics.py
-rw-r--r--  1 root staff   1594 Sep 18 14:17 time_util.py
-rw-r--r--  1 root staff  56697 Sep 18 14:17 unfollow_util.py
-rw-r--r--  1 root staff  83100 Sep 18 14:17 util.py
-rw-r--r--  1 root staff   6715 Sep 18 14:17 xpath_compile.py
-rw-r--r--  1 root staff    122 Sep 18 14:17 xpath.py
filipstrapinadotcz commented 4 years ago

hmm, its issue with the relative path to the file. Any ideas how to make this go without me deleting every dot? =D

filipstrapinadotcz commented 3 years ago

Issue resolved. Long story short, it was uncompatible version of setuptools and configparser. I will mark it in the install notes