0 0
Read Time:1 Minute, 34 Second

モンスト放置プレイをしているとどうやら大量のLogが吐き出されるらしい。
なのでその処理方法の覚書。将来的には定期的に削除にするかな。

  1. ファイルの場所
    /home/everidea/.cache/lxsession/LXDE-pi/run.log
  2. ファイルの削除
    当該ディレクトリで rm *なんかで削除する
  3. ゴミ箱に行っちゃった場合(ファイルブラウザで処理しちゃった場合等)
    /home/everidea/.local/share/Trash/files
    にいるのでこのファイルを消し完全に削除する。
  4. ファイルがいっぱいになって止まっているので不具合があるかもしれない為一度リブートする

【止まったエラー内容】
おそらくrun.logファイルでディスクが一杯になり、pyautogui処理で行われたスクリーンショットがディスクに書き込めずエラーになったと思われる。

libpng error: Write Error
giblib error: Saving to file .screenshot2022-0521_20-57-45-870908.png failed

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/PIL/ImageFile.py”, line 247, in load
s = read(self.decodermaxblock)
File “/usr/lib/python3/dist-packages/PIL/PngImagePlugin.py”, line 896, in load_read
cid, pos, length = self.png.read()
File “/usr/lib/python3/dist-packages/PIL/PngImagePlugin.py”, line 162, in read
length = i32(s)
File “/usr/lib/python3/dist-packages/PIL/_binary.py”, line 75, in i32be
return unpack_from(“>I”, c, o)[0]
struct.error: unpack_from requires a buffer of at least 4 bytes for unpacking 4 bytes at offset 0 (actual buffer size is 0)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/home/everidea/share/develop/quest-nomal-simple-hikari-houti.py”, line 18, in <module>
elif pyautogui.locateOnScreen(‘btn_syutugeki2.png’,confidence=0.55) != None:
File “/usr/local/lib/python3.9/dist-packages/pyautogui/__init__.py”, line 175, in wrapper
return wrappedFunction(*args, **kwargs)
File “/usr/local/lib/python3.9/dist-packages/pyautogui/__init__.py”, line 213, in locateOnScreen
return pyscreeze.locateOnScreen(*args, **kwargs)
File “/usr/local/lib/python3.9/dist-packages/pyscreeze/__init__.py”, line 372, in locateOnScreen
screenshotIm = screenshot(region=None) # the locateAll() function must handle cropping to return accurate coordinates, so don’t pass a region here.
File “/usr/local/lib/python3.9/dist-packages/pyscreeze/__init__.py”, line 516, in _screenshot_linux
im.load()
File “/usr/lib/python3/dist-packages/PIL/ImageFile.py”, line 253, in load
raise OSError(“image file is truncated”) from e
OSError: image file is truncated
>>>

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %