psDevUK / Image2Text

Powershell an Image into beautiful ASCII art format
https://github.com/psDevUK/Image2Text
4 stars 0 forks source link

Cannot find executable 'image-text-cli.exe' #1

Open XXLMandalorian013 opened 2 years ago

XXLMandalorian013 commented 2 years ago

Hey Adam, I'm having some issues getting started with this module.

Description:

After installing the .net stated in the ReadMe.md, and importing the module into Window PS (5.1) I typed

New-Image2Text

and get the error,

At C:\Program Files\WindowsPowerShell\Modules\Image2Text\1.0.2\Image2Text.psm1:93 char:11
+           throw "Cannot find executable 'image-text-cli.exe'"
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Cannot find exe...e-text-cli.exe':String) [], RuntimeException
    + FullyQualifiedErrorId : Cannot find executable 'image-text-cli.exe' 

I did not see that image-text-cli.exe in the Image2Text.psm1

Steps to reproduce

PS C:\Windows\system32> Get-Module

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Script     1.4.7      PackageManagement                   {Find-Package, Find-PackageProvider, Get-Package, Get-Pack...
Script     1.0.0.1    PowerShellGet                       {Find-Command, Find-DscResource, Find-Module, Find-RoleCap...
Script     2.2.6      PSReadline                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS...

PS C:\Windows\system32> Import-Module -Name Image2Text
PS C:\Windows\system32> Get-Module

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.0.2      Image2Text                          New-Image2Text
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Script     1.4.7      PackageManagement                   {Find-Package, Find-PackageProvider, Get-Package, Get-Pack...
Script     1.0.0.1    PowerShellGet                       {Find-Command, Find-DscResource, Find-Module, Find-RoleCap...
Script     2.2.6      PSReadline                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS...

PS C:\Windows\system32> Get-Command New-Image2Text

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        New-Image2Text                                     1.0.2      Image2Text

PS C:\Windows\system32> New-Image2Text
Cannot find executable 'image-text-cli.exe'
At C:\Program Files\WindowsPowerShell\Modules\Image2Text\1.0.2\Image2Text.psm1:93 char:11
+           throw "Cannot find executable 'image-text-cli.exe'"
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Cannot find exe...e-text-cli.exe':String) [], RuntimeException
    + FullyQualifiedErrorId : Cannot find executable 'image-text-cli.exe' 

Environment:

psDevUK commented 2 years ago

Hey Drew, thanks for using this module or trying to. So try launching powershell in (x86) mode. I think i know the issue, I should have used $PSScriptRoot to import the dll Navigate to the module foder in powershell. Then go into the Prog folder, then try running the command. this should work. Problem crescendo not seeing that .exe that lives in that folder, or add it to Env Path to launch it whatever dir you in. keyboard sti ll broke, let me know if u need more assistance. thanks


From: Drew McClellan @.> Sent: 04 November 2022 12:44 To: psDevUK/Image2Text @.> Cc: Subscribed @.***> Subject: [psDevUK/Image2Text] Cannot find executable 'image-text-cli.exe' (Issue #1)

Hey Adam, having some issue getting started with this module.

Description:

After installing the .net stated in the ReadMe.mdhttps://github.com/psDevUK/Image2Text/blob/main/README.md, and importing the module into Window PS (5.1) I typed

New-Image2Text

and get the error,

At C:\Program Files\WindowsPowerShell\Modules\Image2Text\1.0.2\Image2Text.psm1:93 char:11

Steps to reproduce


PS C:\Windows\system32> Get-Module

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Script     1.4.7      PackageManagement                   {Find-Package, Find-PackageProvider, Get-Package, Get-Pack...
Script     1.0.0.1    PowerShellGet                       {Find-Command, Find-DscResource, Find-Module, Find-RoleCap...
Script     2.2.6      PSReadline                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS...

PS C:\Windows\system32> Import-Module -Name Image2Text
PS C:\Windows\system32> Get-Module

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.0.2      Image2Text                          New-Image2Text
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Script     1.4.7      PackageManagement                   {Find-Package, Find-PackageProvider, Get-Package, Get-Pack...
Script     1.0.0.1    PowerShellGet                       {Find-Command, Find-DscResource, Find-Module, Find-RoleCap...
Script     2.2.6      PSReadline                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS...

PS C:\Windows\system32> Get-Command New-Image2Text

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        New-Image2Text                                     1.0.2      Image2Text

PS C:\Windows\system32> New-Image2Text
Cannot find executable 'image-text-cli.exe'
At C:\Program Files\WindowsPowerShell\Modules\Image2Text\1.0.2\Image2Text.psm1:93 char:11
+           throw "Cannot find executable 'image-text-cli.exe'"
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Cannot find exe...e-text-cli.exe':String) [], RuntimeException
    + FullyQualifiedErrorId : Cannot find executable 'image-text-cli.exe' ```

## Environment:

- Win 10
- .net 3.1.27
- PS 5.1

—
Reply to this email directly, view it on GitHub<https://github.com/psDevUK/Image2Text/issues/1>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKRJYF7KPOERUGSFM5IUCFLWGUAKPANCNFSM6AAAAAARXESUIY>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
XXLMandalorian013 commented 1 year ago

No dice with x86 PS 5.1


Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Windows\system32> Import-Module -Name Image2Text
PS C:\Windows\system32> Get-Module

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.0.2      Image2Text                          New-Image2Text
Script     2.2.6      PSReadline                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS...

PS C:\Windows\system32> New-Image2Text
Cannot find executable 'image-text-cli.exe'
At C:\Program Files\WindowsPowerShell\Modules\Image2Text\1.0.2\Image2Text.psm1:93 char:11
+           throw "Cannot find executable 'image-text-cli.exe'"
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Cannot find exe...e-text-cli.exe':String) [], RuntimeException
    + FullyQualifiedErrorId : Cannot find executable 'image-text-cli.exe' ```