スキップしてメイン コンテンツに移動

投稿

2月, 2024の投稿を表示しています

raspiでseleniumの自動化用のファイル作り直し

2024/2/17に不注意でraspiのsdカードを壊し jupyterファイルのバックアップを取らずにos再インストールを試みるという 愚行を重ねたためまたjupyterで作業ファイルを作ることになったので念の為 残しておく 途中なので要らない行も有るかも これだけ再現できればやってたことは出来るのでよき from selenium import webdriver from selenium.webdriver import Chrome, ChromeOptions from selenium.webdriver.common.keys import Keys from selenium.webdriver.common. action_chains import ActionChains from  selenium.webdriver.common.by  import By from selenium.webdriver.chrome. service import Service  import time options1=ChromeOptions() extension_path ='/home/pi/selenium1/Mouse- Coordinates.crx' options1.add_extension( extension_path) path1 = '/usr/bin/chromedriver' driver1=Chrome(service= Service(path1),options= options1) url1 = ' https://www.google.co.jp/ ' driver1.get( url1 )  actions=ActionChains(driver1) def pointclick(px,py):   actions.move_by_offset(px, py).click().perform()   actions.move_by_offset(-px,- py).click().perform() serch_input=driver1.find_ element(By.NAME,"q") serch_input.send_...

raspi4 のmicrosdが壊れたようなのでos再インストール

2024/2/17  raspiを終了するときに直接 電源コネクタ抜いてたらraspiが起動しなくなった os再インストールをしようとするが書き込みが19%で止まる フォーマットも途中で止まる microsdは壊れたようだ ウィドウのraspiアイコンからシャットダウン か sudo poweroff  でないとSDカードが壊れるらしい 128gb 800円弱のLAZOS の sdカードを買ってきた rpi-imagerでosを再インストール 最後の最後でfatでosがなんたらエラー 最初にsdカードを初期化する必要があったようだ rpi-imagerのCHOOSE OSから一番下のEraseで初期化 これでosがインストールできるようになった os は raspbian 64bit bookworm とりあえず動いている ただデフォのconfig.txtをモニタ関連だけ書き換えても動かなかったので 以下を使用 コメントアウト部分は載せてない disable_overscan=1 dtparam=audio=on arm_64bit=1 [pi4] # Enable DRM VC4 V3D driver on top of the dispmanx display stack dtoverlay=vc4-fkms-v3d max_framebuffers=2 [all] hdmi_force_hotplug=1 hdmi_ignore_edid=0xa5000080 hdmi_cvt=1024 600 60 3 hdmi_group=2 hdmi_mode=88 start_x=1 gpu_mem=128 #以下はアクセスLEDチカチカを消すだけ (今回効いてない?) dtparam=pwr_led_trigger=none,pwr_led_activelow=on dtparam=act_led_trigger=none,act_led_activelow=on dtparam=pwr_led_trigger=none,pwr_led_activelow=on 日本語IMEがないのでfcitx5をインストール sudo apt install fcitx5-mozc im-config -n fcitx5 再起動でいけた 最初 ibus-mozcをインスト...

Ubuntu でマウスのダブルクリックの間隔を変更する場合

 アクティビティを開き”アクセシビリティ”で検索するとメニューが出る マウスがチャタリングするのでダブルクリックの間隔を調整しようと検索すると 「アクティビティ画面を開き、 universal access  または ユニバーサルアクセス と入力します。」 とあるのが何故かユニバーサルアクセスは無く変わりに’アクセシビリティ’だった