Not sure what changed by the script that I have been running all of a sudden doesn't run anymore. Today, when adding in like_by_location, the program keeps throwing the error "Syntax Error: Invalid Syntax"
Default
are you getting this error too?
validate_username() missing 1 required positional argument: 'logger'
Good catch @ceribbo 馃憣, actually, I forgot to pass self.username for validate_username definition in that particular method of like_by_locations and it is fixed in #2042
And I couldn't understand the problem of this Issue, maybe adding some details or an error output from console would help to solve it.
Cheers!
Love to but the thing becomes a wild goose chase. As I fix one error or comment it out, it goes to another one saying the if: or except: syntax is incorrect...
I tried copy and pasting the example from Readme "like_by_location" into the quickstart and running it and that didn't even work!
I think at least all the sets have to happen before any action otherwise it can cause problems but then again when I first ran it I had multiple sets happening after the initial one so that shouldn't affect things. Not sure what is going on to be honest.
On a separate note, I did push an edit for str on proxy. Not sure if that was accepted or not.
Repetition,
_And I couldn't understand the problem of this Issue, maybe adding some details or an error output from console would help to solve it._
If you have multiple settings of the same feature before an action, the the last setting will be accepted.
set_do_like(enabled=True, percentage=90)
set_do_like(enabled=True, percentage=0) ##this `set`ting- the last setting, will be taken into accaunt
like_by_locations(locations=['somelocation'], amount=50, media=None, skip_top_posts=True)
Also, putting
settings before theaction which will use them is kind of a logical requirement, elsewhere, it would behave unexpectedly or even raise a problem
Correct. I really don't know the cause of the error. Everything works fine, I copy+paste the like_by_locations into the program. Everything stops working and it now says syntax error.
In the example, it is not locations=['abc','bdf',etc]. It is set as locations(['list'], amount, media, skip)
There are tons of errors in syntax on the Readme with the rolling changes. Kind of confusing! I can try the new syntax of locations=['list'] and see if that works.
In python, there is a notion of arguments, keyword arguments, positional arguments, etc. and styles of passing them,
e.g.,
#default formal arguments of the function in its definition
def like_by_locations(locations=None, amount=50, media=None, skip_top_posts=True)
#some function call
like_by_locations(locations=['somelocation'], amount=50, media=None, skip_top_posts=True)
# other function call
like_by_locations(['somelocation'], 50, media=None, skip_top_posts=True)
# another function call
like_by_locations(['somelocation'], 50, None, True)
# wrong function call
like_by_locations(locations=['somelocation'], amount=50, media=None, True)
"""SyntaxError: positional argument follows keyword argument"""
Please before blaming README, learn some bits of python 馃槱
If you could post a screenshot of the error, you will get help much quickier
I'm sending it to you offline. The error screenshot doesn't help and everything is in the correct notation...
Update: Yeah I'm a f'ing retard. I figured it out. lol... Not enough sleep, sorry!
Closed out something too soon with a ) where I shouldn't have. Such is life... Thanks for the help @uluQulu !
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this problem still occurs, please open a new issue
Most helpful comment
I'm sending it to you offline. The error screenshot doesn't help and everything is in the correct notation...
Update: Yeah I'm a f'ing retard. I figured it out. lol... Not enough sleep, sorry!
Closed out something too soon with a ) where I shouldn't have. Such is life... Thanks for the help @uluQulu !