{"id":2055,"date":"2015-08-22T21:18:49","date_gmt":"2015-08-22T12:18:49","guid":{"rendered":"http:\/\/tech.akat.info\/?p=2055"},"modified":"2015-08-22T21:26:01","modified_gmt":"2015-08-22T12:26:01","slug":"typeerror-module-object-is-not-callable","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=2055","title":{"rendered":"TypeError: &#8216;module&#8217; object is not callable"},"content":{"rendered":"<p>random\u95a2\u6570\u3092\u5229\u7528\u3057\u3088\u3046\u3068\u3057\u305f\u3089\u30bf\u30a4\u30c8\u30eb\u306e\u30a8\u30e9\u30fc<br \/>\n\u30fb(random.py\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u4f5c\u6210\u3057\u3066\u3044\u305f\u306e\u3067)\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u5909\u66f4<br \/>\n\u30fb\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u306e\u4f5c\u6210<br \/>\n\u3067\u30a8\u30e9\u30fc\u304c\u89e3\u6d88\u3057\u305f<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@hostname:\/home\/shimizu\/python# cat random.py\r\nimport random\r\nif __name__ == &quot;__main__&quot;:\r\n    print random.random()\r\nroot@hostname:\/home\/shimizu\/python# python random.py\r\nTraceback (most recent call last):\r\n  File &quot;random.py&quot;, line 3, in &lt;module&gt;\r\n    print random.random()\r\nTypeError: 'module' object is not callable\r\nroot@hostname:\/home\/shimizu\/python# mv random.py mkrandom.py\r\nroot@hostname:\/home\/shimizu\/python# python mkrandom.py\r\nTraceback (most recent call last):\r\n  File &quot;mkrandom.py&quot;, line 3, in &lt;module&gt;\r\n    print random.random()\r\nTypeError: 'module' object is not callable\r\nroot@hostname:\/home\/shimizu\/python# ln -s \/usr\/lib\/python2.7\/random.py .\/\r\nroot@hostname:\/home\/shimizu\/python# python mkrandom.py\r\n0.228268881195\r\n<\/pre>\n<h1>\u53c2\u8003URL<\/h1>\n<p>help with python urllib2 import error<br \/>\nhttp:\/\/stackoverflow.com\/questions\/1933928\/help-with-python-urllib2-import-error#comment1842908_1933953<\/p>\n","protected":false},"excerpt":{"rendered":"<p>random\u95a2\u6570\u3092\u5229\u7528\u3057\u3088\u3046\u3068\u3057\u305f\u3089\u30bf\u30a4\u30c8\u30eb\u306e\u30a8\u30e9\u30fc \u30fb(random.py\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u4f5c\u6210\u3057\u3066\u3044\u305f\u306e\u3067)\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u5909\u66f4 \u30fb\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u306e\u4f5c\u6210 \u3067\u30a8\u30e9\u30fc\u304c\u89e3\u6d88\u3057\u305f root@hostname:\/home\/s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[76],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2055"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2055"}],"version-history":[{"count":2,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2055\/revisions"}],"predecessor-version":[{"id":2057,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2055\/revisions\/2057"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}