jdhitsolutions / WingetTools

A set of PowerShell tools for working with the winget package manager.
MIT License
157 stars 16 forks source link

[Bug]: Failed to convert to YAML for some packages #24

Open piotrminkina opened 1 year ago

piotrminkina commented 1 year ago

Describe the problem

The Get-WGInstalled function returns a WARNING: Failed to convert to YAML message when the Raspberry Pi Imager package is listed. Full error message below.

WARNING: Failed to convert to YAML
WARNING: Found Raspberry Pi Imager [RaspberryPiFoundation.RaspberryPiImager]
Version: 1.8.1
Publisher: Raspberry Pi Ltd
Publisher Url: https://www.raspberrypi.com
Publisher Support Url: https://github.com/raspberrypi/rpi-imager/issues
Author: Raspberry Pi Ltd
Moniker: rpi-imager
Description: Raspberry Pi Imager is the quick and easy way to install Raspberry Pi OS and other operating systems to a microSD card, ready to use with your Raspberry Pi.
Homepage: https://www.raspberrypi.org/blog/raspberry-pi-imager-imaging-utility
License: Apache-2.0
License Url: https://github.com/raspberrypi/rpi-imager/blob/qml/license.txt
Privacy Url: https://www.raspberrypi.com/privacy
Copyright: Copyright (C) 2020 Raspberry Pi Ltd
Copyright Url: https://github.com/raspberrypi/rpi-imager/blob/qml/license.txt
Release Notes:
  - Advanced options: Rename to OS customization
  - OS customization: change to tabbed UI
  - OS customization: make SSH public key field a textarea
  - OS customization: add convenience button to run ssh-keygen
  - OS customization: Enforce choice as part of write flow
  - OS customization: Fixes for state consistency across UI
  - Home: Add mechanism for selecting Raspberry Pi device
  - Shared: Multiple keyboard focus fixes
  - i18n: Adds Spanish/Ukrainian translations
  - i18n: Updates French, Catalan, Italian, German, Spanish, Russian,
  - i18n: Use en_US as reference string, and make en_GB a translation
  - Linux: Workaround for ArchLinux's lsblk labeling internal SD card readers
  - Allow drag-dropping image files to Imager.
  - Local .xz files: parse uncompressed size for better progress reports.
  - Windows: fix .zst support
Release Notes Url: https://github.com/raspberrypi/rpi-imager/releases/tag/v1.8.1
Documentation:
  Raspberry Pi Documentation: https://www.raspberrypi.com/documentation
Tags:
  flash
  imager
  raspberrypi
  sd
Installer:
  Installer Type: nullsoft
  Installer Url: https://github.com/raspberrypi/rpi-imager/releases/download/v1.8.1/imager-1.8.1.exe
  Installer SHA256: 529902c74c3c7fb63f5da648077cfa4031b7f3b9a56b1bdd58e4e54c7973b86a
  Release Date: 2023-10-19
Raspberry Pi Imager       RaspberryPiFoundation.Ras 1.8.1
                          pberryPiImager

No problems with function Get-WGPackage

>  Get-WGPackage -ID 'RaspberryPiFoundation.RaspberryPiImager' | Select *

Moniker             : rpi-imager
Description         : Raspberry Pi Imager is the quick and easy way to install Raspberry Pi OS and other operating systems to a microSD card, ready to use with your Raspberry Pi.
Author              : Raspberry Pi Ltd
Publisher           : Raspberry Pi Ltd
PublisherUrl        : https://www.raspberrypi.com
PublisherSupportUrl : https://github.com/raspberrypi/rpi-imager/issues
Homepage            : https://www.raspberrypi.org/blog/raspberry-pi-imager-imaging-utility
Name                : Raspberry Pi Imager
ID                  : RaspberryPiFoundation.RaspberryPiImager
Version             : 1.8.1
Source              : winget
Computername        : ORILLA

Expectation

Output without warning :)

Additional Information

> Get-InstalledModule -Name WingetTools

Version    Name                                Repository           Description
-------    ----                                ----------           -----------
1.7.0      WingetTools                         PSGallery            A set of PowerShell tools for working with the winget package manager.

> winget --version
v1.6.2771

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.22621.2428
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.2428
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

PowerShell version

5.1

Platform

Windows 11 Pro or Enterprise

Additional Checks

fourthborngoose commented 5 months ago

Ran into the same issue. I added -WarningAction SilentlyContinue to suppress the issue. Store Apps were: WARNING: Failed to convert to YAML WARNING: Found 7-Zip [7zip.7zip] Version: 24.06

WARNING: Failed to convert to YAML WARNING: Found App Installer [Microsoft.AppInstaller] Version: 1.22.11261.0

WARNING: Failed to convert to YAML WARNING: Found Microsoft.UI.Xaml [Microsoft.UI.Xaml.2.7] Version: 7.2208.15002.0

WARNING: Failed to convert to YAML WARNING: Found Microsoft.UI.Xaml [Microsoft.UI.Xaml.2.8] Version: 8.2310.30001.0