jarrodnorwell / InstaPy2

Instagram automation tool for farming comments, follows and likes, written in Python
GNU General Public License v3.0
49 stars 9 forks source link

Error on likes on tag #15

Closed Senooy closed 1 year ago

Senooy commented 1 year ago

While using like_tags.py, the console returns me this

[INFO]: Successfully logged in as: **** Traceback (most recent call last): File "/Users/youneskhelifi/Documents/projets/InstaPy2/like_tags.py", line 7, in session.like(amount=10, iterable=['roubaix'], type=LikeType.Tags) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/instapy2/instapy2.py", line 232, in like medias = self.configuration.media.medias_tag(amount=amount, tag=tag, randomize_media=randomize_media, skip_top=skip_top) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/instapy2/utilities/media.py", line 58, in medias_tag medias += [media for media in self.session.hashtag_medias_recent(name=tag, amount=amount) if not any(username in media.user.username for username in self.configuration.people.users_to_skip)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/instapy2/utilities/media.py", line 58, in medias += [media for media in self.session.hashtag_medias_recent(name=tag, amount=amount) if not any(username in media.user.username for username in self.configuration.people.users_to_skip)] ^^^^^^^^^^^^^^^^^^ AttributeError: 'MediaUtility' object has no attribute 'configuration'

Did I do something wrong ?

jarrodnorwell commented 1 year ago

Are you using the GitHub or PyPI version? GitHub has the fix for this but PyPI does not yet.

Senooy commented 1 year ago

I downloaded the GitHub project, and changed the script for my logs, that's it

jarrodnorwell commented 1 year ago

Could you run git clone https://github.com/InstaPy2/InstaPy2; cd InstaPy2; pip install .? There should be no issue with the latest version.

Senooy commented 1 year ago

Now it returns me this :

Traceback (most recent call last): File "/Users/youneskhelifi/InstaPy2/like_tags.py", line 1, in from instapy2 import InstaPy2 File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/instapy2/init.py", line 1, in from .instapy2 import InstaPy2 File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/instapy2/instapy2.py", line 1, in from .instapy2_base import InstaPy2Base File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/instapy2/instapy2_base.py", line 1, in from .configuration import Configuration File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/instapy2/configuration.py", line 4, in from .utilities import CommentsUtility File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/instapy2/utilities/init.py", line 1, in from .comments import CommentsUtility File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/instapy2/utilities/comments.py", line 1, in from ..configuration import Configuration ImportError: cannot import name 'Configuration' from partially initialized module 'instapy2.configuration' (most likely due to a circular import) (/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/instapy2/configuration.py)

jarrodnorwell commented 1 year ago

@Senooy should be fixed now if you do git pull; pip install ., for some reason the pull request didn't work.

Senooy commented 1 year ago

Everything works perfectly ! Do yo have any documentation available ? The link in GitHub is broken

jarrodnorwell commented 1 year ago

Only examples currently but I'll be adding documentation, just bad at writing it honestly.

Senooy commented 1 year ago

Is it possible to interact (like, follow, comment) with people following a page? If you need any help for documentation, I'm here 👋🏼

jarrodnorwell commented 1 year ago

@Senooy it is indeed, you can comment, like and follow media and users.