{"action":"created","issue":{"url":"https://api.github.com/repos/Andrew-Shay/Neuron/issues/14","repository_url":"https://api.github.com/repos/Andrew-Shay/Neuron","labels_url":"https://api.github.com/repos/Andrew-Shay/Neuron/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/Andrew-Shay/Neuron/issues/14/comments","events_url":"https://api.github.com/repos/Andrew-Shay/Neuron/issues/14/events","html_url":"https://github.com/Andrew-Shay/Neuron/issues/14","id":345784957,"node_id":"MDU6SXNzdWUzNDU3ODQ5NTc=","number":14,"title":"Build would not run - gevent imports - gevent.__hub_local.py - pyinstaller","user":{"login":"jonbluhm","id":34772769,"node_id":"MDQ6VXNlcjM0NzcyNzY5","avatar_url":"https://avatars1.githubusercontent.com/u/34772769?v=4","gravatar_id":"","url":"https://api.github.com/users/jonbluhm","html_url":"https://github.com/jonbluhm","followers_url":"https://api.github.com/users/jonbluhm/followers","following_url":"https://api.github.com/users/jonbluhm/following{/other_user}","gists_url":"https://api.github.com/users/jonbluhm/gists{/gist_id}","starred_url":"https://api.github.com/users/jonbluhm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonbluhm/subscriptions","organizations_url":"https://api.github.com/users/jonbluhm/orgs","repos_url":"https://api.github.com/users/jonbluhm/repos","events_url":"https://api.github.com/users/jonbluhm/events{/privacy}","received_events_url":"https://api.github.com/users/jonbluhm/received_events","type":"User","site_admin":false},"labels":[{"id":296281240,"node_id":"MDU6TGFiZWwyOTYyODEyNDA=","url":"https://api.github.com/repos/Andrew-Shay/Neuron/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"Andrew-Shay","id":4878195,"node_id":"MDQ6VXNlcjQ4NzgxOTU=","avatar_url":"https://avatars1.githubusercontent.com/u/4878195?v=4","gravatar_id":"","url":"https://api.github.com/users/Andrew-Shay","html_url":"https://github.com/Andrew-Shay","followers_url":"https://api.github.com/users/Andrew-Shay/followers","following_url":"https://api.github.com/users/Andrew-Shay/following{/other_user}","gists_url":"https://api.github.com/users/Andrew-Shay/gists{/gist_id}","starred_url":"https://api.github.com/users/Andrew-Shay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andrew-Shay/subscriptions","organizations_url":"https://api.github.com/users/Andrew-Shay/orgs","repos_url":"https://api.github.com/users/Andrew-Shay/repos","events_url":"https://api.github.com/users/Andrew-Shay/events{/privacy}","received_events_url":"https://api.github.com/users/Andrew-Shay/received_events","type":"User","site_admin":false},"assignees":[{"login":"Andrew-Shay","id":4878195,"node_id":"MDQ6VXNlcjQ4NzgxOTU=","avatar_url":"https://avatars1.githubusercontent.com/u/4878195?v=4","gravatar_id":"","url":"https://api.github.com/users/Andrew-Shay","html_url":"https://github.com/Andrew-Shay","followers_url":"https://api.github.com/users/Andrew-Shay/followers","following_url":"https://api.github.com/users/Andrew-Shay/following{/other_user}","gists_url":"https://api.github.com/users/Andrew-Shay/gists{/gist_id}","starred_url":"https://api.github.com/users/Andrew-Shay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andrew-Shay/subscriptions","organizations_url":"https://api.github.com/users/Andrew-Shay/orgs","repos_url":"https://api.github.com/users/Andrew-Shay/repos","events_url":"https://api.github.com/users/Andrew-Shay/events{/privacy}","received_events_url":"https://api.github.com/users/Andrew-Shay/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-07-30T14:34:28Z","updated_at":"2018-08-25T20:50:02Z","closed_at":null,"author_association":"NONE","body":"Hi - \r\nI recently cloned this repo and attempted to build as-is as I have a Flask app that I'd like to operate as a standalone app. Here are the issues I ran into.\r\n\r\n1. Could not run `__main__.py` due to import errors\r\n2. Once built, the *.exe would report import errors relating to gevent. (could not import gevent.__hub_local.py, gevent.__hub_primitives, etc)\r\n3. cefpython would report errors that some data files could not be found. \r\n\r\nHere are the fixes\r\n\r\n1. Changed `from gevent.wsgi import WSGIServer` to `from gevent.pywsgi import WSGIServer`\r\n2. Recent versions of gevent cause problems with pyinstaller. I specified the version 1.2.2 in requirements and this eliminated this problem. I'm sure there is another way to use > 1.2.2 but I do not understand how to implement compiled modules with pyinstaller.\r\n3. This is something with trying to find files with frozen installs. I changed the following section in `def main():` in `__main__.py`:\r\n```\r\ndef main():\r\n    check_versions()\r\n    sys.excepthook = cef.ExceptHook  # To shutdown all CEF processes on error\r\n    settings = {}\r\n    if getattr(sys, 'frozen', False):\r\n        settings = {\r\n            'resources_dir_path': sys._MEIPASS,\r\n            'locales_dir_path': sys._MEIPASS + os.sep + 'locales',\r\n            'browser_subprocess_path': sys._MEIPASS + os.sep + 'subprocess.exe',\r\n        }\r\n```\r\nOnce I applied this fixes, I was able to build and run the exe file without issue. I was also able to edit the `build.spec` file to build into a single file.\r\nI only use git for personal use as I'm completely an amateur so I'm not sure how to issue a pull request - if that's the correct thing to do. \r\n\r\nThis repo helped me accomplish what I needed - thanks!"},"comment":{"url":"https://api.github.com/repos/Andrew-Shay/Neuron/issues/comments/415995720","html_url":"https://github.com/Andrew-Shay/Neuron/issues/14#issuecomment-415995720","issue_url":"https://api.github.com/repos/Andrew-Shay/Neuron/issues/14","id":415995720,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTk5NTcyMA==","user":{"login":"Andrew-Shay","id":4878195,"node_id":"MDQ6VXNlcjQ4NzgxOTU=","avatar_url":"https://avatars1.githubusercontent.com/u/4878195?v=4","gravatar_id":"","url":"https://api.github.com/users/Andrew-Shay","html_url":"https://github.com/Andrew-Shay","followers_url":"https://api.github.com/users/Andrew-Shay/followers","following_url":"https://api.github.com/users/Andrew-Shay/following{/other_user}","gists_url":"https://api.github.com/users/Andrew-Shay/gists{/gist_id}","starred_url":"https://api.github.com/users/Andrew-Shay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andrew-Shay/subscriptions","organizations_url":"https://api.github.com/users/Andrew-Shay/orgs","repos_url":"https://api.github.com/users/Andrew-Shay/repos","events_url":"https://api.github.com/users/Andrew-Shay/events{/privacy}","received_events_url":"https://api.github.com/users/Andrew-Shay/received_events","type":"User","site_admin":false},"created_at":"2018-08-25T20:50:02Z","updated_at":"2018-08-25T20:50:02Z","author_association":"OWNER","body":"Hey @jonbluhm I'm glad this project helped!  \r\nv2.0.1 should fix the import errors 1 and 2 you had.  \r\nLet me know if no. 3 is still an issue for you. I do not have that issue."}}
{"actor":{"display_login":"Andrew-Shay"}}