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

OSError: [WinError 87] The parameter is incorrect, importing from any nsx file (Synology Note Station) #9

Open
arthytrip opened this issue Jul 30, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@arthytrip
Copy link

arthytrip commented Jul 30, 2024

Describe the bug
Unable to import to Joplin from any nsx file (Synology Note Station).
No matter if the nsx file is composed by one, few or many Synology notebooks; the error is always the same.

OS
Windows 11

To Reproduce
This is the command and the results on a simple, one notebook file

>jimmy-cli-windows.exe 20240730_192835_4731_test.nsx --format synology_note_station
[07/30/24 19:32:55] INFO     Importing notes from "20240730_192835_4731_test.nsx"
                    INFO     Start parsing
[07/30/24 19:33:05] INFO     Finished parsing: 2 notebooks, 23 notes, 13 resources
                    INFO     Start import to Joplin
Traceback (most recent call last):
  File "jimmy_cli.py", line 71, in <module>
  File "jimmy_cli.py", line 67, in main
  File "jimmy.py", line 111, in jimmy
  File "common.py", line 68, in create_progress_bars
  File "enlighten\manager.py", line 55, in get_manager
  File "enlighten\_manager.py", line 69, in __init__
  File "enlighten\_basemanager.py", line 74, in __init__
  File "blessed\terminal.py", line 167, in __init__
  File "jinxed\win32.py", line 331, in get_term
  File "jinxed\win32.py", line 181, in set_console_mode
  File "jinxed\win32.py", line 86, in _check_bool
OSError: [WinError 87] The parameter is incorrect.
[19200] Failed to execute script 'jimmy_cli' due to unhandled exception!
@arthytrip arthytrip added the bug Something isn't working label Jul 30, 2024
@marph91
Copy link
Owner

marph91 commented Jul 30, 2024

This sounds like a general issue (with the progress bar implementation). Could you share which shell you are using? I couldn't reproduce with cmd, git bash and powershell.

@arthytrip
Copy link
Author

arthytrip commented Jul 30, 2024

This sounds like a general issue (with the progress bar implementation). Could you share which shell you are using? I couldn't reproduce with cmd, git bash and powershell.

Same error using Windows PowerShell.

Using git bash it worked!

@marph91
Copy link
Owner

marph91 commented Jul 31, 2024

Same error using Windows PowerShell.

Using git bash it worked!

Glad it worked finally 😄

The creator of the module said it might be related to the windows version. Would you mind to share your windows version and build number (Start -> Settings -> System -> About)?

@arthytrip
Copy link
Author

Same error using Windows PowerShell.
Using git bash it worked!

Glad it worked finally 😄

The creator of the module said it might be related to the windows version. Would you mind to share your windows version and build number (Start -> Settings -> System -> About)?

Yes, of course
The version of Windows I use is 11 Enterprise 23H2, build 22631.3880 and Experience Pack 1000.22700.1020.0.

@avylove
Copy link

avylove commented Jul 31, 2024

Was the Windows version incorrectly reported above? It has Windows 10 there.

@arthytrip
Copy link
Author

Was the Windows version incorrectly reported above? It has Windows 10 there.

I apologize, W11 is the right version.
I corrected the first post.

@avylove
Copy link

avylove commented Jul 31, 2024

Do you have python installed? If you do, could you run a few things in Python? If not, it's ok.

If you can, you'll need to install the jinxed package using pip.
Then either as a script or individual statements.

import sys
import msvcrt
from jinxed import win32

fd = sys.__stdout__.fileno()
print(fd)

filehandle = msvcrt.get_osfhandle(fd)
print(filehandle)

mode = win32.get_console_mode(filehandle)
print(mode)
print(mode & win32.ENABLE_VIRTUAL_TERMINAL_PROCESSING)

win32.set_console_mode(filehandle, mode | win32.ENABLE_VIRTUAL_TERMINAL_PROCESSING)

@marph91
Copy link
Owner

marph91 commented Aug 1, 2024

If you have the time, you can try the latest jimmy release with cmd. It contains a fix by @avylove.

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

No branches or pull requests

3 participants