moto icon indicating copy to clipboard operation
moto copied to clipboard

Feature Request: Personalize support

Open kmiller96 opened this issue 4 years ago • 6 comments

Hi team - thank you so much for all your hard work on the Moto package. This thing is a god send!!

I've noticed that there is currently no way to mock Amazon Personalize. Is this something on your radar? Happy to implement the endpoint myself if I can be pointed in the right direction.

kmiller96 avatar Mar 19 '21 02:03 kmiller96

Hi @kmiller96, happy to hear that Moto is useful for you!

I'm not aware of any plans to mock that service, so if you have the time, PR's are always welcome. There's a write-up here on how to get started with a new service: https://github.com/spulec/moto/blob/master/CONTRIBUTING.md#missing-services

Let me know if you need any help.

bblommers avatar Mar 19 '21 07:03 bblommers

I've struggled with this for ages. I can't seem to build the lxml wheel on my VM regardless how hard I try. How do you resolve this install issue?

 src/lxml/etree.c:249681:62: error: ‘PyTypeObject {aka struct _typeobject}’ has no member named ‘tp_print’; did you mean ‘tp_dict’?
     __pyx_type_4lxml_5etree___pyx_scope_struct_14_iterentities.tp_print = 0;
                                                                ^~~~~~~~
                                                                tp_dict
  Compile failed: command '/usr/bin/gcc' failed with exit code 1
  creating tmp
  cc -I/home/ec2-user/miniconda3/envs/moto-dev/include/libxml2 -I/home/ec2-user/miniconda3/envs/moto-dev/include -I/usr/include/libxml2 -c /tmp/xmlXPathInitevt8chza.c -o tmp/xmlXPathInitevt8chza.o
  cc tmp/xmlXPathInitevt8chza.o -L/home/ec2-user/miniconda3/envs/moto-dev/lib -lxml2 -o a.out
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for lxml

I've installed Cython, libxml2-dev, and libxslt-dev but I can't seem to figure it out from there. For the moment I've resorted to solving the dependencies manually during make test runs, but I couldn't get the make init target working for me.

Sorry if this is a dumb question - I'm quite new to contributing to open source. I'll keep pushing through as I really want this feature!

kmiller96 avatar Apr 02 '21 01:04 kmiller96

I think I resolved the issue - the problem was that my virtual environment had python>=3.9. I reverted to python=3.8.8 and that resolved this issue for me. I figured that out by seeing a similar issue being discussed over here: https://github.com/seomoz/reppy/issues/122

kmiller96 avatar Apr 02 '21 02:04 kmiller96

Thanks for posting the fix, @kmiller96. Usually it is a matter of installing libxml2-dev and libxslt-dev, but I wasn't aware it was broken on Py3.9

bblommers avatar Apr 02 '21 10:04 bblommers

@kmiller96 Just figured out the root cause - we're pinning a version of lxml that does not have support for Py3.9. A separate PR has been raised to fix this. Apologies for the troubles.

bblommers avatar Apr 10 '21 10:04 bblommers

No problem @bblommers. I managed to work around it, and the posted answer should have helped someone else who had the same issues.

kmiller96 avatar Apr 11 '21 02:04 kmiller96