Giulz00 / chatter-bot-api

Automatically exported from code.google.com/p/chatter-bot-api
0 stars 0 forks source link

Issues with Python 2.7 #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I try to use this with Python 2.7 I get this error:

[andy@other clever]$ python chatter2.py 
  File "chatterbotapi.py", line 101
    self.vars['sessionid'] = response_values[1] if len(response_values) > 1 else ''
                                                 ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "chatter2.py", line 7, in ?
    from chatterbotapi import ChatterBotFactory, ChatterBotType
  File "/var/www/hacks.apidoctor.com/clever/chatterbotapi.py", line 101
    self.vars['sessionid'] = response_values[1] if len(response_values) > 1 else ''
                                                 ^
SyntaxError: invalid syntax

Original issue reported on code.google.com by andrewmo...@gmail.com on 9 Nov 2011 at 2:07

GoogleCodeExporter commented 9 years ago
I am unable to reproduce this here, using python --version Python 2.7.1. But I 
accept this issue anyways.

Original comment by pierredavidbelanger@gmail.com on 9 Nov 2011 at 2:18

GoogleCodeExporter commented 9 years ago
May be your Python version do not support this 'if' syntax, I will switch to a 
plain old 'if else' syntax.

Original comment by pierredavidbelanger@gmail.com on 9 Nov 2011 at 2:19

GoogleCodeExporter commented 9 years ago
Thanx for letting me know btw :)

Original comment by pierredavidbelanger@gmail.com on 9 Nov 2011 at 2:21

GoogleCodeExporter commented 9 years ago

Original comment by pierredavidbelanger@gmail.com on 9 Nov 2011 at 2:51

GoogleCodeExporter commented 9 years ago
This should be fix (in r16). Since I can not reproduce the problem here, please 
test it.
Download chatterbotapi.pyc version 1.1.1 here:
http://code.google.com/p/chatter-bot-api/downloads/detail?name=chatterbotapi.pyc
-1.1.1.zip

Original comment by pierredavidbelanger@gmail.com on 9 Nov 2011 at 2:53