Error on personal funcion

11 views
Skip to first unread message

Poppa la gnocca

unread,
Jan 24, 2020, 4:27:04 PM1/24/20
to spyder

def titolo_w(titolo):
   titol = titolo.split('.')
   titol[1] += '_weight'
   titolo = '.'.join(titol)
   return titolo 
.........and this is the error msg: 
def titolo_w(titolo):
File "<ipython-input-778-5f591f155d80>", line 1
def titolo_w(titolo):
                            ^
SyntaxError: unexpected EOF while parsing

Florian Obersteiner

unread,
Jan 24, 2020, 9:07:58 PM1/24/20
to spyder
when I copy-paste your function into Spyder, it runs perfectly fine - cannot reproduce the error.
(Spyder 4.0.1, Python 3.8.1, on Linux)

Poppa la gnocca

unread,
Jan 25, 2020, 3:53:11 PM1/25/20
to spyd...@googlegroups.com
Hi Florian,
sound really strange  wont work on my win 10 pc & Spyder 3.3.xx/Anaconda's OEM python version..(guess 3.7.xx)
Sound strange , because I'm starting develop AI listate with plenty calls to several libraries and I don't any errors, but when try if conditions or my own functions, I see such errors...

If you have any idea, it will be really welcome
Thanks
Simon   

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spyderlib/7671bfc4-d8a1-44a7-9e5c-4e8251545bb3%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages