Title: worker function not found · Issue #9 · realpython/flask-by-example · GitHub
Open Graph Title: worker function not found · Issue #9 · realpython/flask-by-example
X Title: worker function not found · Issue #9 · realpython/flask-by-example
Description: I am running the worker based on the README and get the following error after POSTing a url $ python worker.py 22:45:34 RQ worker 'rq:worker:P6s-MacBook-Pro-2.33821' started, version 0.5.6 22:45:34 22:45:34 *** Listening on default... 22...
Open Graph Description: I am running the worker based on the README and get the following error after POSTing a url $ python worker.py 22:45:34 RQ worker 'rq:worker:P6s-MacBook-Pro-2.33821' started, version 0.5.6 22:45:34...
X Description: I am running the worker based on the README and get the following error after POSTing a url $ python worker.py 22:45:34 RQ worker 'rq:worker:P6s-MacBook-Pro-2.33821' started, version 0.5.6 ...
Opengraph URL: https://github.com/realpython/flask-by-example/issues/9
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"worker function not found","articleBody":"I am running the worker based on the README and get the following error after POSTing a url\r\n\r\n```bash\r\n$ python worker.py\r\n22:45:34 RQ worker 'rq:worker:P6s-MacBook-Pro-2.33821' started, version 0.5.6\r\n22:45:34\r\n22:45:34 *** Listening on default...\r\n22:45:46 default: __main__.count_and_save_words('http://index.hu') (aed5e21f-5b70-44c0-96d8-57845638cda0)\r\n22:45:46 AttributeError: module '__main__' has no attribute 'count_and_save_words'\r\nTraceback (most recent call last):\r\n File \"/Users/peetasan/dev/flask-by-example/virtualenv/lib/python3.6/site-packages/rq/worker.py\", line 568, in perform_job\r\n rv = job.perform()\r\n File \"/Users/peetasan/dev/flask-by-example/virtualenv/lib/python3.6/site-packages/rq/job.py\", line 495, in perform\r\n self._result = self.func(*self.args, **self.kwargs)\r\n File \"/Users/peetasan/dev/flask-by-example/virtualenv/lib/python3.6/site-packages/rq/job.py\", line 206, in func\r\n return import_attribute(self.func_name)\r\n File \"/Users/peetasan/dev/flask-by-example/virtualenv/lib/python3.6/site-packages/rq/utils.py\", line 151, in import_attribute\r\n return getattr(module, attribute)\r\nAttributeError: module '__main__' has no attribute 'count_and_save_words'\r\nTraceback (most recent call last):\r\n File \"/Users/peetasan/dev/flask-by-example/virtualenv/lib/python3.6/site-packages/rq/worker.py\", line 568, in perform_job\r\n rv = job.perform()\r\n File \"/Users/peetasan/dev/flask-by-example/virtualenv/lib/python3.6/site-packages/rq/job.py\", line 495, in perform\r\n self._result = self.func(*self.args, **self.kwargs)\r\n File \"/Users/peetasan/dev/flask-by-example/virtualenv/lib/python3.6/site-packages/rq/job.py\", line 206, in func\r\n return import_attribute(self.func_name)\r\n File \"/Users/peetasan/dev/flask-by-example/virtualenv/lib/python3.6/site-packages/rq/utils.py\", line 151, in import_attribute\r\n return getattr(module, attribute)\r\nAttributeError: module '__main__' has no attribute 'count_and_save_words'\r\n22:45:46 Moving job to 'failed' queue\r\n```","author":{"url":"https://github.com/peetasan","@type":"Person","name":"peetasan"},"datePublished":"2017-06-21T20:49:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/9/flask-by-example/issues/9"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f6491a60-c01f-5a30-50a0-946f26c525e6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD0C:1BE852:10AA93B:16B3A62:696943A3 |
| html-safe-nonce | 01a24e087cfc4ba55dac64bad86ac193d87b1747401abc65d66d2ae73a843c62 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDBDOjFCRTg1MjoxMEFBOTNCOjE2QjNBNjI6Njk2OTQzQTMiLCJ2aXNpdG9yX2lkIjoiMzQ4NDU5MzE0NzUzMjEwMDUxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 04491dceb5d99014eb590b580a7bf8e4650ce9801c8c99439c5d3e34988fa121 |
| hovercard-subject-tag | issue:237660121 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/realpython/flask-by-example/9/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8fd1cd5ff83277d2866cb44d5c4861ed8773763b11810d61255fd3f045bc2037/realpython/flask-by-example/issues/9 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8fd1cd5ff83277d2866cb44d5c4861ed8773763b11810d61255fd3f045bc2037/realpython/flask-by-example/issues/9 |
| og:image:alt | I am running the worker based on the README and get the following error after POSTing a url $ python worker.py 22:45:34 RQ worker 'rq:worker:P6s-MacBook-Pro-2.33821' started, version 0.5.6 22:45:34... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | peetasan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d |
| turbo-cache-control | no-preview |
| go-import | github.com/realpython/flask-by-example git https://github.com/realpython/flask-by-example.git |
| octolytics-dimension-user_id | 5448020 |
| octolytics-dimension-user_login | realpython |
| octolytics-dimension-repository_id | 22891558 |
| octolytics-dimension-repository_nwo | realpython/flask-by-example |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 22891558 |
| octolytics-dimension-repository_network_root_nwo | realpython/flask-by-example |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d69ac0477df0f87da03b8b06cebd187012d7a930 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width