<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nihohi</author_name>
  <author_url>https://blog.hatena.ne.jp/nihohi/</author_url>
  <blog_title>作業記録/備忘録(仮)</blog_title>
  <blog_url>https://nihohi.hatenadiary.org/</blog_url>
  <categories>
    <anon>python</anon>
    <anon>django</anon>
    <anon>celery</anon>
  </categories>
  <description>概要 django+celeryを利用して、あるクラスの処理を非同期に処理しようとした際に、メソッドを利用するところで、「takes exactly 2 arguments (1 given)」と怒られた。 (selfが渡っていないときなどによく見るエラー) 調べてみると、celeryから、classのmethodを利用する際には、それに応じた手続きが必要なようであったので、以下その方法を記載しておく。 背景 あるクラス(Converterというクラス)に含まれるメソッド&quot;convert()&quot;を利用した際に、「raised exception: TypeError('convert() tak…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnihohi.hatenadiary.org%2Fentry%2F20121202%2F1354441038&quot; title=&quot;celeryでclassのmethodを利用する方法 - 作業記録/備忘録(仮)&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-12-02 18:37:18</published>
  <title>celeryでclassのmethodを利用する方法</title>
  <type>rich</type>
  <url>https://nihohi.hatenadiary.org/entry/20121202/1354441038</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
