【解決】TVerRec v2.9.9 設定ファイル読み込みエラーで起動せず

このサイトを検索 | Search this site
TVerRec

TverRecと設定ファイル

TVerRec version 2.9.9 (2023-11-24) がリリースされていたので、久しぶりにダウンロードして動作検証しました。

ところが、設定ファイル(user_setting.ps1)を読み込む段階でエラーを返します。そして、落ちます。

シングルダウンロード [z.download_single.cmd] を実行すると、youtube-dl、ffmpeg のダウンロードまでは問題ないですが、TVerRecバージョンアップでこけます。

私の環境だけの問題なのか?悩んでおります。



追記:解決

追記:2023-12-04

[user_setting.ps1] を直接編集すると動作します。詳細は別記事でまとめました。

TVerRecでTVerの番組をダウンロード!Windowsなら自動インストールで簡単(Version 2.9.9)

TVerRecの使い方(Version 2.9.9)

TVerRecはTVerのHLSコンテンツをダウンロードするPowerShell Coreスクリプトで、Windowsユーザーは3つの必須ソフトウェアを自動インストール。Setting.cmdでGUI起動。TVer以外のコンテンツも対応。ただし、バグ修正のためには2.9.9バージョンが必要。

エラーメッセージ

error_batten

エラーメッセージによると [download_single.ps1] スクリプトの43行目を実行中にエラーとなっていることが分かります。

PowerShell Core
Write-Error: C:\TVerRec\src\download_single.ps1:43 Line | 43 | . (Convert-Path (Join-Path $script:scriptRoot '../src/functions/i … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ❗ 設定ファイルの読み込みに失敗しました

download_single.ps1:43行目

WindowsPowerShell

download_single.ps1 42~44行 を転載します。

../src/functions/initialize.ps1 を呼び出しているので、initialize.ps1 の処理でエラーになっているようです。

\src\download_single.ps1
42 try { 43 . (Convert-Path (Join-Path $script:scriptRoot '../src/functions/initialize.ps1')) 44 if (!$?) { exit 1 }

initialize.ps1

error_batten

エラーメッセージ「設定ファイルの読み込みに失敗しました」とあるので、user_setting.ps1 が読み込めないようです。

ディレクトリ指定が間違っているのか、当方の PowerShell Core の環境設定が悪いのか?

../src/functions/initialize.ps1
30 #設定ファイル読み込み 31 $script:confDir = Convert-Path (Join-Path $script:scriptRoot '../conf') 32 $script:devDir = Join-Path $script:scriptRoot '../dev' 33 try { 34 . (Convert-Path (Join-Path $script:confDir 'system_setting.ps1')) 35 if ( Test-Path (Join-Path $script:confDir 'user_setting.ps1') ) { 36 . (Convert-Path (Join-Path $script:confDir 'user_setting.ps1')) 37 } elseif ($IsWindows) { 38 while (!( Test-Path (Join-Path $script:confDir 'user_setting.ps1')) ) { 39 Write-Output ('ユーザ設定ファイルを作成する必要があります') 40 . 'gui/gui_setting.ps1' 41 } 42 if ( Test-Path (Join-Path $script:confDir 'user_setting.ps1') ) { 43 . (Convert-Path (Join-Path $script:confDir 'user_setting.ps1')) 44 } 45 } else { 46 Write-Error ('❗ ユーザ設定が完了してません') ; exit 1 47 } 48 } catch { Write-Error ('❗ 設定ファイルの読み込みに失敗しました') ; exit 1 }

PowerShell Core

PowerShell Core の各スコープの実行ポリシーを表示すると、「RemoteSigned」なので問題ないようですね。

PowerShell Core
PS C:\> get-executionpolicy -list Scope ExecutionPolicy ----- --------------- MachinePolicy Undefined UserPolicy Undefined Process Undefined CurrentUser Undefined LocalMachine RemoteSigned
PowerShell 7 をインストールする方法

PowerShell 7 をインストールする方法

Windows 専用の PowerShell 5.1 に対し、クロスプラットフォームで利用できる PowerShell 7 が登場。機能強化や新機能搭載で、PowerShell の可能性を広げる。

ソフトウェア情報

※記事とは異なるバージョンが表示される場合があります。

まとめ

matome
reload
  • 当方の環境では、TVerRec 2.9.9 が動作しない。
  • エラーメッセージを辿っていくと3つのスクリプトがコールされていることが分かった。

    download_single.ps1、initialize.ps1、user_setting.ps1

  • エラーの原因は user_setting.ps1 が呼び出せないことだった。
  • PowerShell Core の実行ポリシーは「RemoteSigned」なのでスクリプトを実行できる環境にある。
  • う~ん、私だけの問題だろうか?
  • TverRec | SC2
TverRecの使い方 (2023-05-05)

TverRecの使い方 (2023-05-05)

TVerRecは、PowerShell Coreで動くTVerのHLSコンテンツダウンロードツール。最新版はフォルダ構成とコマンドファイルが変わった。

ダウンローダーの検証記事まとめ【2023年最新版】

ダウンローダーの検証記事まとめ【2023年最新版】

HLS対応ダウンローダー、YouTube・TVer専用アプリ、動画シーク正規化ソフト、個人情報ブッコ抜きシステムのチェック方法など、ダウンローダーに関する情報をまとめています。

SC2
ブログサークルSNS
クリックして応援してね!
人気ブログランキングPVアクセスランキング にほんブログ村ブログランキング・にほんブログ村へ

このサイトを検索 | Search this site

コメントを投稿

0 コメント