kinto icon indicating copy to clipboard operation
kinto copied to clipboard

init fails on osx at the backend selection step

Open mvalipour opened this issue 10 years ago • 3 comments

I followed the instructions given here, but when asked:

$ Select the backend you would like to use: (1 - postgresql, 2 - redis, default - memory)

entering 1 and 2 leads to the following error:

Traceback (most recent call last):
  File ".venv/bin/kinto", line 11, in <module>
    load_entry_point('kinto', 'console_scripts', 'kinto')()
  File "/work/git/kinto/kinto/__main__.py", line 108, in main
    answer = input(prompt).strip()
AttributeError: 'int' object has no attribute 'strip'

and entering nothing + enter will lead to the following error.

Traceback (most recent call last):
  File ".venv/bin/kinto", line 11, in <module>
    load_entry_point('kinto', 'console_scripts', 'kinto')()
  File "/work/git/kinto/kinto/__main__.py", line 108, in main
    answer = input(prompt).strip()
  File "<string>", line 0

    ^
SyntaxError: unexpected EOF while parsing

It appears that the code expects a string but getting a number and null, therefore failing on the .strip() call here.


Entering "", "1" and "2" works. I'm assuming that's not the way it's designed to be?

mvalipour avatar Aug 27 '16 17:08 mvalipour

I had the same error on Friday. I don't know what changed for it to suddenly appear. It looks like it is not using the correct input function from six. I am planning to work on this today.

Natim avatar Aug 29 '16 07:08 Natim

Ok this commit break it: https://github.com/Kinto/kinto/commit/ab3db80c0a99a88a4430c1c4fa140f991dd5c833#diff-87f3ff0cfd5b39515d0d84446afef901

Natim avatar Aug 29 '16 07:08 Natim

Released in Kinto 4.1.1

Natim avatar Aug 29 '16 09:08 Natim