在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/ Python問答
奧特蛋 回答

確認(rèn)nginx是否啟動成功,按照你說的情況十有八九是nginx掛了,a. 80端口沖突啟動失敗, b. 語法有錯啟動失敗,c. nginx正常,配置沒刷新。我能想到的就這么多了,忘了加一句你這個proxy_pass 是解決啥的反向啊

卟乖 回答

try except把錯誤都忽略了,問題自然看不到,正因為錯誤所以是也沒寫入數(shù)據(jù)庫的。而且你最好熟悉下基本的python數(shù)據(jù)結(jié)構(gòu)和語法,程序里小問題很多,按照錯誤提示一個一個改。

選擇 回答

自己看的python垃圾回收機(jī)制比較好的一篇(雖然我沒看透),推薦給你看看
https://blog.csdn.net/u010138...

撥弦 回答

你應(yīng)該把詳細(xì)的異常棧貼出來。

出問題的可能是這一段

def validate_content(self,field):
    """限制微博文字長度"""
    content = field.content

應(yīng)該改成

xxx = field.data

參考 https://wtforms.readthedocs.i...

浪婳 回答

請問你這個問題解決了嗎?我也遇到這個,加我qq:37727640

骨殘心 回答

hack 一下:

config.module
        .rule('expose')
            .test(require.resolve('jquery'))
            .use('expose-loader')
                .loader('expose-loader')
                .options('$')
                .end()
            .use('a-loader')
                .loader('expose-loader')
                .options('jQuery')
拮據(jù) 回答

已解決,在 urls.py 下加上 xadmin.autodiscover()

毀與悔 回答

因為你pymysql沒裝啊,

臭榴蓮 回答

問題已經(jīng)解決了,錯誤在index.html中pagination用法的錯誤,原來的代碼是:
{% if pagination %}

        {{ render_pagination(pagination) }}
    {% endif %}

已經(jīng)改正:
{% if pagination %}
<div class="pagination">

{{ macros.pagination_widget(pagination,'.index') }}

</div>
{% endif %}

同時,修改了macros宏分頁模板:{#% marco input(name,value='',type='text',size=20) %#}
{% macro pagination_widget(pagination, endpoint, fragment='') %}

<!--input type="{{ type }}"
       name="{{ name }}"
       value="{{ value }}"
       size="{{ size }}"
       /-->

<ul class="pagination">

<li{% if not pagination.has_prev %} class="disabled"{% endif %}>
    <a href="{% if pagination.has_prev %}{{ url_for(endpoint, page=pagination.prev_num, **kwargs) }}{{ fragment }}{% else %}#{% endif %}">
        &laquo;
    </a>
</li>
{% for p in pagination.iter_pages() %}
    {% if p %}
        {% if p == pagination.page %}
        <li class="active">
            <a href="{{ url_for(endpoint, page = p, **kwargs) }}{{ fragment }}">{{ p }}</a>
        </li>
        {% else %}
        <li>
            <a href="{{ url_for(endpoint, page = p, **kwargs) }}{{ fragment }}">{{ p }}</a>
        </li>
        {% endif %}
    {% else %}
    <li class="disabled"><a href="#">&hellip;</a></li>
    {% endif %}
{% endfor %}
<li{% if not pagination.has_next %} class="disabled"{% endif %}>
    <a href="{% if pagination.has_next %}{{ url_for(endpoint, page=pagination.next_num, **kwargs) }}{{ fragment }}{% else %}#{% endif %}">
        &raquo;
    </a>
</li>

</ul>

{% endmacro %}
注釋掉的是原來的內(nèi)容

純妹 回答

不太明白你表達(dá)的什么意思,請具體描述一下問題

維他命 回答

因為你的代碼中函數(shù)體沒有縮進(jìn),python是嚴(yán)格要求縮進(jìn)的。html_page那行開始,到return html_page.text那行結(jié)束,需要縮進(jìn)。下面的是改正后的:
如果你運行失敗,請把錯誤信息貼出來,這段代碼我執(zhí)行過,沒有問題。 我有點懷疑你用的Python2嗎,這段代碼要求Python版本3.0以上

import requests
from bs4 import BeautifulSoup
def get_webpage(url):
    html_page=requests.get(url)
    if html_page.status_code!=200:
        print("invalid url",html_page.status_code)
        return None
    else:
        return html_page.text
site="https://tw.stock.yahoo.com/q/q?s=2377"
html=get_webpage(site)
soup=BeautifulSoup(html,"html.parser")
print(soup)
櫻花霓 回答

1、用 spy ++ 獲取相關(guān)控件的句柄。
2、使用 pywin32 這個第三方庫來進(jìn)行編程。
3、然后使用 pyInstaller 進(jìn)行打包,你就可以在windows機(jī)器上使用了。

如果你的軟件使用的是當(dāng)今流行的 DrectUI 界面,那么 spy++ 會獲取不到相關(guān)控件的句柄。這我就沒有拌飯了,如果其它的大牛有辦法,不妨告訴一聲。

未命名 回答

python 使用縮進(jìn)表示語句塊,改成下面這樣

def save_content(data_num,data_big,data_all):
    download_page = 100 * data_num * data_big / data_all
    if download_page > 100:
        download_page = 100
    print "%.2f%%" % download_page

你請求的 url 響應(yīng)頭里面沒有 Content-Length 字段,urllib.urlretrieve(url[, filename[, reporthook[, data]]]) 的第三個參數(shù) reporthook 是一個回調(diào)函數(shù),這里就是 save_content 這個函數(shù)
data_all 這個參數(shù)對應(yīng) Content-Length 的值,由于沒有定義,默認(rèn)為 -1 所以顯示負(fù)數(shù)

孤慣 回答

函數(shù)名錯了,是get_media_requests

最后的解決辦法是將鍵盤默認(rèn)輸入法調(diào)成英文。appium有自帶輸入法 名為:appium android input manager for unicode

瘋子范 回答

這里是官方的保存為mp4的案例,你可以參考一下。鏈接描述

"""
===================
Saving an animation
===================

This example showcases the same animations as `basic_example.py`, but instead
of displaying the animation to the user, it writes to files using a
MovieWriter instance.
"""

# -*- noplot -*-
import numpy as np
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import matplotlib.animation as animation


def update_line(num, data, line):
    line.set_data(data[..., :num])
    return line,

# Set up formatting for the movie files
Writer = animation.writers['ffmpeg']
writer = Writer(fps=15, metadata=dict(artist='Me'), bitrate=1800)


fig1 = plt.figure()

data = np.random.rand(2, 25)
l, = plt.plot([], [], 'r-')
plt.xlim(0, 1)
plt.ylim(0, 1)
plt.xlabel('x')
plt.title('test')
line_ani = animation.FuncAnimation(fig1, update_line, 25, fargs=(data, l),
                                   interval=50, blit=True)
line_ani.save('lines.mp4', writer=writer)

fig2 = plt.figure()

x = np.arange(-9, 10)
y = np.arange(-9, 10).reshape(-1, 1)
base = np.hypot(x, y)
ims = []
for add in np.arange(15):
    ims.append((plt.pcolor(x, y, base + add, norm=plt.Normalize(0, 30)),))

im_ani = animation.ArtistAnimation(fig2, ims, interval=50, repeat_delay=3000,
                                   blit=True)
im_ani.save('im.mp4', writer=writer)
來守候 回答

有一個方案你試下可不可以,你安裝numpy版本應(yīng)該是 numpy+mkl 吧,把 site-packages/numpy/core 文件夾中 mkl_ 開頭的文件拷貝到 python 的根目錄下(與 python.exe 同目錄)。

我以為 回答

告訴你找不到scripy==1.1.0這個依賴項,懷疑是你鏡像的倉庫沒有同步完全,改成官方倉庫安裝試試,應(yīng)該是你鏡像的有問題

命于你 回答

因為你升級了pip 10.。。。。。。換回9就正常了。。。。親測

還有你設(shè)置一下環(huán)境變量應(yīng)該也可以,目前用的10.0.1,應(yīng)該就是環(huán)境變量的問題