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

Error: The parameter is incorrect. #3916

Closed
aaamoon opened this issue Apr 25, 2024 · 13 comments · May be fixed by #4412
Closed

Error: The parameter is incorrect. #3916

aaamoon opened this issue Apr 25, 2024 · 13 comments · May be fixed by #4412
Assignees
Labels
bug Something isn't working windows

Comments

@aaamoon
Copy link

aaamoon commented Apr 25, 2024

What is the issue?

[GIN] 2024/04/26 - 01:24:28 | 200 | 0s | 127.0.0.1 | HEAD "/"
[GIN] 2024/04/26 - 01:24:28 | 200 | 1.1779ms | 127.0.0.1 | POST "/api/show"
[GIN] 2024/04/26 - 01:24:28 | 200 | 1.4496ms | 127.0.0.1 | POST "/api/show"
{"function":"process_single_task","level":"INFO","line":1510,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":7,"tid":"28416","timestamp":1714065868}
{"function":"log_server_request","level":"INFO","line":2741,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":53568,"status":200,"tid":"32280","timestamp":1714065868}
[GIN] 2024/04/26 - 01:24:28 | 200 | 2.2784ms | 127.0.0.1 | POST "/api/chat"

image

OS

Windows

GPU

Nvidia

CPU

Intel

Ollama version

0.1.32

@aaamoon aaamoon added the bug Something isn't working label Apr 25, 2024
@aaamoon aaamoon changed the title Error on run ollama serve on windows Error: The parameter is incorrect. Apr 25, 2024
@aaamoon
Copy link
Author

aaamoon commented Apr 28, 2024

It works fine if I run the command from a terminal in VSCode.

@dhiltgen dhiltgen self-assigned this May 1, 2024
@dhiltgen
Copy link
Collaborator

dhiltgen commented May 1, 2024

I'm not able to reproduce this. Can you explain your setup a bit more?

@i486
Copy link

i486 commented May 1, 2024

Are you on Windows 7?

@dhiltgen
Copy link
Collaborator

dhiltgen commented May 2, 2024

My suspicion is this is somehow locale based. We attempt to put the terminal into a mode that supports control characters.
This appears not to be working which is why it isn't rendering the spinner. Unfortunately this error Error: The parameter is incorrect. isn't particularly specific, and doesn't come from our code, so some underlying library or windows API is reporting this, and I'm not sure where yet.

Could someone who's seeing this try running through the various commands in the CLI to see which of them trigger this error, and which (if any) don't? Maybe that will help narrow the search to try to find the problem.

@i486
Copy link

i486 commented May 2, 2024

I'm currently in the process of testing this.

For me, it seems like most commands work fine. Only the "run" command is affected by the "Error: The parameter is incorrect." error.

ollama0130-1

ollama0130-2

ollama0130-3

As you can see, I am on Windows 7, which is why you see these (←[?25h←[?25l) artifacts. Ignore this as it seems to be Windows 7 specific. Additionally, I previously tested these commands on versions 1.31 and 1.32, but forgot to take screenshots.
Anyway, I remember being able to execute "ollama run model" to initiate a model starting a conversation in some earlier version of Ollama. I'm uncertain which Ollama version introduced this parameter error, as I primarily use GUI apps. Hence, I'm currently downgrading Ollama version by version to pinpoint when this error started occurring.

PS: I'm aware that Ollama doesn't officially support Windows 7, but since this specific issue was reported by some Windows 10 users, I thought it might be help. Also please let me know if you need more commands to test as I am kinda new to Ollama's command line.

@i486
Copy link

i486 commented May 2, 2024

So it seems this parameter bug started occurring from version 0.1.30.

image

By the way, it would be great if you could address this ←[?25l⠙ ←[?25h←[?25l←[2K←[1G⠹ ←[?25h←[?25l issue for us Windows 7 users. It seems that only one Windows 10-only API is preventing the new version of Golang from running under Windows 7. Otherwise, Go itself and its compiled apps run smoothly under Windows 7 after extending the kernel with VxKex

@dhiltgen
Copy link
Collaborator

dhiltgen commented May 2, 2024

@i486 thanks for that extra detail! As far as windows 7 support, I think we'd be open to clean/simple PRs that fix bugs which help people running on windows 7, but the core maintainers probably don't have bandwidth to focus on these.

@nb001 can you confirm you see the same on Windows 10?

@aaamoon
Copy link
Author

aaamoon commented May 6, 2024

Reference

I am on Windows 10.

@aaamoon
Copy link
Author

aaamoon commented May 6, 2024

So it seems this parameter bug started occurring from version 0.1.30.

image

By the way, it would be great if you could address this ←[?25l⠙ ←[?25h←[?25l←[2K←[1G⠹ ←[?25h←[?25l issue for us Windows 7 users. It seems that only one Windows 10-only API is preventing the new version of Golang from running under Windows 7. Otherwise, Go itself and its compiled apps run smoothly under Windows 7 after extending the kernel with VxKex

@i486 @dhiltgen I am on Windows 10. Only the "run" command is affected by the "Error: The parameter is incorrect" error when I use version 0.1.32. It works fine when I use version 0.1.29.

@i486
Copy link

i486 commented May 6, 2024

@aaamoon

That's odd. I noticed that the screenshot in your first post looks just like mine (←[?25l⠙ ←[?25h) when I'm using Windows 7.

I tried it on Windows 10 recently, and I didn't have those issues with the screen artifacts or the "Parameter is incorrect" error.

Are you using an older version of Windows 10 or something?

Anyway, could you please share the server.log file located in %LOCALAPPDATA%\Ollama?

@aaamoon
Copy link
Author

aaamoon commented May 6, 2024

@i486 I am on Windows 10, version 21H1 (Professional).

This should be a problem with the Windows. There is no obvious error in the server.log.

When I use "run" command, the log will output the following content:

[GIN] 2024/04/26 - 01:24:28 | 200 | 0s | 127.0.0.1 | HEAD "/"
[GIN] 2024/04/26 - 01:24:28 | 200 | 1.1779ms | 127.0.0.1 | POST "/api/show"
[GIN] 2024/04/26 - 01:24:28 | 200 | 1.4496ms | 127.0.0.1 | POST "/api/show"
{"function":"process_single_task","level":"INFO","line":1510,"msg":"slot data","n_idle_slots":1,"n_processing_slots":0,"task_id":7,"tid":"28416","timestamp":1714065868}
{"function":"log_server_request","level":"INFO","line":2741,"method":"GET","msg":"request","params":{},"path":"/health","remote_addr":"127.0.0.1","remote_port":53568,"status":200,"tid":"32280","timestamp":1714065868}
[GIN] 2024/04/26 - 01:24:28 | 200 | 2.2784ms | 127.0.0.1 | POST "/api/chat"

@dhiltgen
Copy link
Collaborator

dhiltgen commented May 7, 2024

@aaamoon that's a good data point. From what I can tell, it looks like Win 10 21H1 is out of support. Are other people seeing this problem also running older updates of Windows? If you update to Win 10 22H2 does the problem go away?

@aaamoon
Copy link
Author

aaamoon commented May 8, 2024

@dhiltgen I have updated to Win 10 22H2, the problem go away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants