误差:功能()理由代码必须是代码,而不是体质。
我的主要档案
with open("city.txt","r") as f:
d2 = f.read()
d2=d2.strip()
if len(d2)!=0 or len(d2)!=1:
m=d2
else:
m="new york"
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("wx1.txt","a+") as f:
f.write(str(str(forecast.date)+" "+ str(forecast.sky_text))
await client.close()
这是错误的全部标志。
06-19 15:59:58.408 6609 6645 I python : File "/mnt/d/girlchat1/.buildozer/android/app/main.py", line 74, in <module>
06-19 15:59:58.410 6609 6645 I python : File "/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/python_weather/__init__.py", line 28, in <module>
06-19 15:59:58.411 6609 6645 I python : File "/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/python_weather/client.py", line 1, in <module>
06-19 15:59:58.412 6609 6645 I python : File "/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/python_weather/rest.py", line 3, in <module>
06-19 15:59:58.420 6609 6645 I python : File "/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/aiohttp/__init__.py", line 6, in <module>
06-19 15:59:58.421 6609 6645 I python : File "/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/aiohttp/client.py", line 32, in <module>
06-19 15:59:58.422 6609 6645 I python : File "/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/aiohttp/http.py", line 7, in <module>
06-19 15:59:58.423 6609 6645 I python : File "/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/aiohttp/http_parser.py", line 15, in <module>
06-19 15:59:58.424 6609 6645 I python : File "/mnt/d/girlchat1/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/Olivia/armeabi-v7a/aiohttp/helpers.py", line 607, in <module>
根据这一说法,帮助者有错误。 页: 1 第607和以下是同一部法典。
class CeilTimeout(async_timeout.timeout):
def __call__(self) -> 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
页: 1 Don 了解造成什么问题,但任何帮助都是巨大的。