{"action":"created","issue":{"url":"https://api.github.com/repos/markfinger/python-react/issues/70","repository_url":"https://api.github.com/repos/markfinger/python-react","labels_url":"https://api.github.com/repos/markfinger/python-react/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/markfinger/python-react/issues/70/comments","events_url":"https://api.github.com/repos/markfinger/python-react/issues/70/events","html_url":"https://github.com/markfinger/python-react/issues/70","id":182979504,"number":70,"title":"Web2Py support: ImportError('No module named react.render',)","user":{"login":"Anima-t3d","id":830386,"avatar_url":"https://avatars.githubusercontent.com/u/830386?v=3","gravatar_id":"","url":"https://api.github.com/users/Anima-t3d","html_url":"https://github.com/Anima-t3d","followers_url":"https://api.github.com/users/Anima-t3d/followers","following_url":"https://api.github.com/users/Anima-t3d/following{/other_user}","gists_url":"https://api.github.com/users/Anima-t3d/gists{/gist_id}","starred_url":"https://api.github.com/users/Anima-t3d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anima-t3d/subscriptions","organizations_url":"https://api.github.com/users/Anima-t3d/orgs","repos_url":"https://api.github.com/users/Anima-t3d/repos","events_url":"https://api.github.com/users/Anima-t3d/events{/privacy}","received_events_url":"https://api.github.com/users/Anima-t3d/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-14T07:15:21Z","updated_at":"2016-10-15T09:05:42Z","closed_at":null,"body":"Does this work with Web2Py? I am relatively new to python and Web2Py. I want to implement react server side rendering in an existing Web2Py application.\r\n\r\nI tried the following on a local instance:\r\n`pip install react` and created `modules/react_test.py`:\r\n\r\n```python\r\nfrom react.render import render_component\r\n\r\ndef test_render(url):\r\n\treturn render_component('../react/Url.jsx', {'arg': url})\r\n\r\n```\r\nIt will give an error `﻿﻿﻿ImportError('No module named react.render',)`. \r\nDid I do something wrong or is it because I am trying to use `python-react` with Web2Py?\r\n\r\nThanks in advance."},"comment":{"url":"https://api.github.com/repos/markfinger/python-react/issues/comments/253972242","html_url":"https://github.com/markfinger/python-react/issues/70#issuecomment-253972242","issue_url":"https://api.github.com/repos/markfinger/python-react/issues/70","id":253972242,"user":{"login":"Anima-t3d","id":830386,"avatar_url":"https://avatars.githubusercontent.com/u/830386?v=3","gravatar_id":"","url":"https://api.github.com/users/Anima-t3d","html_url":"https://github.com/Anima-t3d","followers_url":"https://api.github.com/users/Anima-t3d/followers","following_url":"https://api.github.com/users/Anima-t3d/following{/other_user}","gists_url":"https://api.github.com/users/Anima-t3d/gists{/gist_id}","starred_url":"https://api.github.com/users/Anima-t3d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anima-t3d/subscriptions","organizations_url":"https://api.github.com/users/Anima-t3d/orgs","repos_url":"https://api.github.com/users/Anima-t3d/repos","events_url":"https://api.github.com/users/Anima-t3d/events{/privacy}","received_events_url":"https://api.github.com/users/Anima-t3d/received_events","type":"User","site_admin":false},"created_at":"2016-10-15T09:05:42Z","updated_at":"2016-10-15T09:05:42Z","body":"\r\n**What OS and version are you on? What python version (python --version)?**\r\nI am running a local instance of the web2py app on mac OS X El Capitan 10.11.6. With Python 2.7.10\r\n\r\n**What command are you using to start the python process?**\r\nI use the [bundled web2py app](http://www.web2py.com/examples/static/web2py_osx.zip) to start the server and modify it through the browser.\r\n\r\n**If you start a python interpreter with just python, then run import react. What happens?** **If it works, can you try react.__file__?**\r\n\r\n```\r\n$ python\r\n[TEXT HERE]\r\n>>> import react\r\n>>> react.__file__\r\n'/Library/Python/2.7/site-packages/react/__init__.pyc'\r\n```\r\n\r\nIt seems that when I run the app it doesn't get access to the react file. Could it be solved by copying or symlinking to this file inside the` /Users/XXX/Documents/web2py/web2py.app/Contents/Resources/applications/react_test/modules` or like you mentioned do something with the `PYTHONPATH`\r\n\r\nI am first trying it out on a local instance, but once I get it working it will be deployed on a CentOS server."}}
{"actor":{"display_login":"Anima-t3d"}}