Traceback (most recent call last):
File "custom.py", line 8, in
from instapy import InstaPy
File "/home/pi/InstaPy/instapy/__init__.py", line 2, in
from .instapy import InstaPy
File "/home/pi/InstaPy/instapy/instapy.py", line 1909
if not isinstance(usernames, list):
--------------------------------> ^
getting this error after last pull, @uluQulu ?
Hi @aku6640
Attach your instapy.py file in a zip, I will look.
thank you!
@aku6640
Python supports only one kind of indentation in a source file, either space or a tab.
In your file, there are lots of indentation with tab which is making the problem. Cos in InstaPy space is used as an indentation.
Replace all of those tabs with spaces.
1 tab = 4 spaces
You can do it easily with text editors like Notepad++ by running an _extended search_ for
\t(_tabcharacter_) and replace with' '(4spaces).
thank you, I did that, but now I am getting:
Traceback (most recent call last):
File "custom.py", line 8, in
from instapy import InstaPy
File "/home/pi/InstaPy/instapy/__init__.py", line 2, in
from .instapy import InstaPy
File "/home/pi/InstaPy/instapy/instapy.py", line 40, in
from .util import get_watcher
ImportError: cannot import name get_watcher
hi @uluQulu, got any chance to see what the problem is?
Hi @aku6640
Better post the screenshot of the error.
But if it is the one as in above, then you have done something unwanted cos I did say not to use get_watchers function cos it is outdated and I will add similar and much better functionality in my new PR.
Regards
I didn't write it myself but just pulled.. strange that it pulls the old version? When I try to pull it says already up to date.
when I do git status it says:
On branch master
Your branch is ahead of 'origin/master' by 4 commits.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add
(use "git checkout --
(commit or discard the untracked or modified content in submodules)
modified: InstaPy (modified content)
modified: instapy/instapy.py
no changes added to commit (use "git add" and/or "git commit -a")
How do I get the instapy.py from master, without the modified changes?
@aku6640
If you do not have modified core files, just take backup of everything like your logs files, quickstart scripts, DB file etc and reset the repository with git.
Or just reset the instapy.py file which is conlicting, or any other file which is conflicting.
You problem is not difficult, find the find the files which are problematic and reset them.
But if you have custom modifications in core files and wants to keep them then you must carefully fix those files.
se GitHub Desktop to show you the modified files, or use git commands (_search internet_) or use Atom text editor to do it.
Good luck!
thanks!
git revert
git reset instapy/instapy.py gives still the same error
git checkout HEAD -- instapy/instapy.py gives also the same error still
How can I reset the instapy file? the options they give didn't work for me
@aku6640
There are _git reset hard_ kind of commands. Git can definetely do it if you find the right command.
But if it is not feasible, try to re-download the same file(s) from repo and replace it with yours.
I've copied and pasted the instapy file from repo and deleted mine. Working now again, thanks!