擅长:python、mysql、java
<p>直接的问题是<code>monthrange</code>需要两个参数;但是由于某种原因,您将使用您拥有的两个参数并将它们连接到一个字符串中。不要这样做;只要传递参数:</p>
<pre><code>calendar.monthrange(cYfDateY, cYfDateM)
</code></pre>
<p>不过,剧本的其余部分也很奇怪。您正确地计算了昨天的日期,但随后将其转换为字符串,然后使用第三方<code>arrow</code>库从该字符串中获取月份和日期。这根本行不通,因为现在这些都是弦了。你为什么这么做?为什么不直接得到你已经拥有的月份和日期呢?在</p>
^{pr2}$