Skip to content
This repository has been archived by the owner on Mar 6, 2019. It is now read-only.

SyntaxError: invalid syntax line 121 #31

Closed
Daemoni19478 opened this issue Nov 26, 2017 · 6 comments
Closed

SyntaxError: invalid syntax line 121 #31

Daemoni19478 opened this issue Nov 26, 2017 · 6 comments

Comments

@Daemoni19478
Copy link

Hi, first i'm not a developer, just a curious CM. I'm trying to use twecoll with python for make graphics of followers and hashtags. It's the first time i use it. When i tried, this is what happened:

PS C:\twecoll> python twecoll init sisepuedesanse –followers
File "twecoll", line 121
query = map(lambda (k, v): (k, urllib.quote(v)), urlparse.parse_qsl(query))
^
SyntaxError: invalid syntax

Could anyone help me with this?

Thanks

@jdevoo
Copy link
Owner

jdevoo commented Nov 26, 2017

Did you modify the script? I just ran the following commands with success using the latest version 1.13

twecoll init sisepuedesanse --folowers

twecoll init --followers sisepuedesanse

the parameter followers or 'o' is preceded by double dash or single dash respectively.

What version of Python are you using?

@joeylowe
Copy link

joeylowe commented Feb 7, 2018

Hi! I'm in a similar situation and I'm running Python 3.6. I assume that's the issue. Is there a version of twecoll that runs on 3.6? I use this version for so many other things. I do have 2.7 installed on this Windows machine but I have no idea how to specify which version of Python for a script to use. Thanks for your advice.

@jdevoo
Copy link
Owner

jdevoo commented Feb 8, 2018

I should take the time to upgrade to Python 3...
You can specify which version in the first line after shebang followed by the path to the Python you want. Example shebangs with real paths such as #!C:\Python27\python.exe.
There are other ways though.

@joeylowe
Copy link

joeylowe commented Feb 8, 2018

Thanks for fast reply sir. Yes, the real path worked good! I wasn't sure if you were actively working on this script anymore so I started going through it last night in an attempt to upgrade to 3. If okay, I'll send you what I do over the weekend and see if that helps it along or not.

@jdevoo
Copy link
Owner

jdevoo commented Feb 9, 2018

oh fantastic! thank you! I had identified a resource for helping at http://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html

@jdevoo
Copy link
Owner

jdevoo commented Jun 21, 2018

see #38

@jdevoo jdevoo closed this as completed Jun 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants