Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-AeriesSection errors on line 39 ("Input string was not in a correct format.") #57

Closed
busdrw opened this issue Oct 10, 2022 · 2 comments · Fixed by #58
Closed

Get-AeriesSection errors on line 39 ("Input string was not in a correct format.") #57

busdrw opened this issue Oct 10, 2022 · 2 comments · Fixed by #58
Assignees
Labels
bug Something isn't working

Comments

@busdrw
Copy link

busdrw commented Oct 10, 2022

When I issue Get-AeriesSection -SchoolCode 6 -Section 140, I get the following error:

Cannot convert value "/140" to type "System.Int32". Error: "Input string was not in a correct format."
At C:\Users\redacted\Documents\WindowsPowerShell\Modules\AeriesApi\1.0.0\Public\Get-AeriesSection.ps1:39 char:13
+             $Endpoint =+ "/$SectionNumber"
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvalidCastFromStringToInteger

I suspect that the =+ shown there is supposed to be +=. When I make that change in my local copy of the module, everything works as expected.

@busdrw
Copy link
Author

busdrw commented Oct 10, 2022

This happens on PowerShell version 5.1.19041.1682. It doesn't happen on PowerShell 7.2.6 so I guess =+ exists there.

@jameslancaster
Copy link
Collaborator

Hi @busdrw! Thanks for submitting this issue along with the fix! I am confirming that I have replicated the issue, and I will be submitting a PR soon to address it.

@jameslancaster jameslancaster self-assigned this Oct 11, 2022
@jameslancaster jameslancaster added the bug Something isn't working label Oct 11, 2022
@jameslancaster jameslancaster linked a pull request Oct 11, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants