ioerror

    3熱度

    1回答

    下面的代碼是函數的一部分。 getLatestFileName函數獲取正確的fileName(本地存儲)。 的錯誤是由tryCatch表達引起的結果:< - 嘗試(xbrlDoAll ...) 儘管我試着用一試功能和嘗試捕捉抓住它,我甚至改變選項show.error.messages = FALSE。 我一直得到以下輸出這導致R鍵崩潰: [1] 「FINAL STEP」 [1] 「步驟1」 錯誤:

    2熱度

    1回答

    鑑於此代碼: try: #do something except IOError as message: logging.error(message) raise message 我要測試的異常處理部分,以實現完全覆蓋。 在單元測試我已經試過: with patch(new=Mock(side_effect=IOError(errno.EIO))):

    1熱度

    1回答

    我最近下載了一個在pygame中製作的遊戲的字體,但是當使用字體的提示意味着彈出時,會顯示錯誤。 錯誤讀取: Traceback (most recent call last): File "/home/pi/Desktop/Python Game.py", line 83, in <module> game_loop() File "/home/pi/Desktop/Python Game.

    0熱度

    1回答

    我相關的代碼塊如下: path = "\\Users\\Harmless\\Documents\\untitled" cellorder = [] cellcont = [] for roots, dirs, files, in os.walk(path): for file in natural_sort(files): if "Row" in file:

    0熱度

    1回答

    我有一個PowerShell腳本,它以Fire-and-Forget方式生成x個其他PowerShell腳本。 爲了跟蹤我剛剛開始的所有腳本的進度,我創建了一個臨時文件,其中我全部使用json格式編寫日誌消息來報告進度。 在父腳本中,我使用Get-Content -Wait監視該日誌文件。每當我在日誌文件中收到一行時,我都會解析json並更新一個對象數組,然後使用Format-Table顯示。這樣

    1熱度

    1回答

    Im新的django,我正在嘗試製作一個電子商務網站。之後,我改變它 我的網站恢復到這樣那樣的錯誤,可能是什麼:因爲我總是每次收到的錯誤,我嘗試做makemigrations我已刪除TEMPLATE_DIRS並已將其列入到模板設置說明如下問題 Request Method: GET Request URL: http://localhost:8000/admin/ Django Version

    1熱度

    1回答

    我試圖從SFTP服務器複製文件。 我可以使用python pysftp進行連接。 我可以運行: data = srv.listdir() for i in data: print I 然後我得到目錄列表。但是,當我嘗試 sftp.put (localpath,"file_name.txt") 我得到 "IOError: [Errno 13] Permission denied: 'C:

    -1熱度

    2回答

    我試圖運行下面的腳本,簡單的讀取和圖像,並再次將其保存: from PIL import Image import os rootdir = '/home/user/Desktop/sample' for subdir, dirs, files in os.walk(rootdir): for file in files: im = Image.open(file)

    0熱度

    2回答

    我試圖加載CSV到Phython 2使用蟒蛇用下面的代碼: pd.read_csv('C:\Users\thakuar1\Desktop\Machine_Learning\at_LoanStats3a_20170620_v12.csv') 但繼續運行到下面的錯誤: IOError: File C:\Users hakuar1\Desktop\Machine_Learningt_LoanStat

    0熱度

    1回答

    我只是想調用tracert並以字符串形式得到結果。看起來tracert調用工作正常,因爲在發生錯誤之前結果顯示在控制檯上。 import subprocess import sys proc = subprocess.Popen(["tracert", "localhost"], stderr=subprocess.PIPE, stdin=subprocess.PIPE)