title: TypeError: function() argument 'code' must be code, not str
body: <p>TypeError: function() argument 'code' must be code, not str</p>
  <p>my main file</p>
  <pre><code>with open(&quot;city.txt&quot;,&quot;r&quot;) as f:
      d2 = f.read()
  d2=d2.strip()
  if len(d2)!=0 or len(d2)!=1:
      m=d2
  
  else:
      m=&quot;new york&quot;
  import asyncio
  import python_weather
  async def getweather():
      client = python_weather.Client(format=python_weather.IMPERIAL)
      weather = await client.find(m)
      for forecast in weather.forecasts:      
          with open(&quot;wx1.txt&quot;,&quot;a+&quot;) as f:
              f.write(str(str(forecast.date)+&quot; &quot;+ str(forecast.sky_text))
      await client.close()
  </code></pre>
  <p>and this is the full logcat of error</p>
  <pre><code>06-19 15:59:58.408  6609  6645 I python  :    File &quot;/mnt/d/girlchat1/.buildozer/android/app/main.py&quot;, line 74, in &lt;module&gt;
  06-19 15:59:58.410  6609  6645 I python  :    File &quot;/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/python_weather/__init__.py&quot;, line 28, in &lt;module&gt;
  06-19 15:59:58.411  6609  6645 I python  :    File &quot;/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/python_weather/client.py&quot;, line 1, in &lt;module&gt;
  06-19 15:59:58.412  6609  6645 I python  :    File &quot;/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/python_weather/rest.py&quot;, line 3, in &lt;module&gt;
  06-19 15:59:58.420  6609  6645 I python  :    File &quot;/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/aiohttp/__init__.py&quot;, line 6, in &lt;module&gt;
  06-19 15:59:58.421  6609  6645 I python  :    File &quot;/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/aiohttp/client.py&quot;, line 32, in &lt;module&gt;
  06-19 15:59:58.422  6609  6645 I python  :    File &quot;/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/aiohttp/http.py&quot;, line 7, in &lt;module&gt;
  06-19 15:59:58.423  6609  6645 I python  :    File &quot;/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/aiohttp/http_parser.py&quot;, line 15, in &lt;module&gt;
  06-19 15:59:58.424  6609  6645 I python  :    File &quot;/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/aiohttp/helpers.py&quot;, line 607, in &lt;module&gt;
  </code></pre>
  <p>According to it there is a error in helpers.py at line no. 607 and below is the code for same</p>
  <pre><code>class CeilTimeout(async_timeout.timeout):
  
  
      def __call__(self) -&gt; async_timeout.timeout:
          if self._timeout is not None:
              self._task = current_task(loop=self._loop)
              if self._task is None:
                  raise RuntimeError(
                      'Timeout context manager should be used inside a task')
              self._cancel_handler = self._loop.call_at(
                  ceil(self._loop.time() + self._timeout), self._cancel_task)
          return self
  </code></pre>
  <p>I Don't know what causing problem but any help would be great</p>