yhat / yhat-client

Python client for ScienceOps
https://www.yhat.com/products/scienceops
29 stars 9 forks source link

Cant deploy with python 3.5 #25

Open coristig opened 7 years ago

coristig commented 7 years ago

HelloWorld works fine with python 2.7, yhat 1.9.12

Below it fails using python 3.5, yhat 1.9.12

from yhat import Yhat, YhatModel
class HelloWorld(YhatModel):
   def execute(self, data):
       me = data['name']
       greeting = "Hello %s!" % me
       return { "greeting": greeting }
yh = Yhat("colin",  "d325fc5bcb83fc197ee01edb58b4b396", "https://sandbox.c.yhat.com")
yh.deploy("HelloWorld", HelloWorld, globals())
Are you sure you want to deploy? (y/N): y

extracting model
  File "<unknown>", line 1
    class HelloWorld(YhatModel):
                                ^
SyntaxError: unexpected EOF while parsing
glamp commented 7 years ago

fixed in e344fb6c3688601df8fdde91daff65f68a626036 but can't figure out how to write test for it