Yep, this was tried on 3.12.0.
And no, that's not the whole traceback; it didn't render properly because I didn't enclose it in pre-formatted markdown text when I copy-pasted.
>>> simplenote2joplin.py --json-file notes.json --author 'insert name' --create-title --verbose-level 1 > all_notes_converted.enex
File "<stdin>", line 1
simplenote2joplin.py --json-file notes.json --author 'insert name' --create-title --verbose-level 1 > all_notes_converted.enex
^^^^^
SyntaxError: invalid syntax
>>>
As for the command on a single line, I've tried that already, it just yields:
python simplenote2joplin.py --json-file notes.json --author 'insert name' --create-title --verbose-level 1 > all_notes_converted.enex
C:\Python312\python.exe: can't open file 'C:\\Users\\username\\simplenote2joplin.py': [Errno 2] No such file or directory
Which is strange, because I've already attempted to incorporate all sorts of different folder and directory pathnames and combinations thereof for the system environment variables, pointing to where the script is and moving it around accordingly to see if one folder is preferable for it than another, but PowerShell seems intent on staying in the current directory (which for me is my user folder) despite having what seem like the correct pathnames added to PATH to forgo specifying exact pathnames.
I've seen that Effilicious post, and will probably settle for what's described therein, just converting them to markdown files, but the goal in trying to run a Python script from pwsh was to attempt acclimation to Python, PowerShell too, really, with something low-key and low-risk.
I have pyenv, so I might try to switch to an older than 3.12 and younger than 3.6 version to see if that changes anything.
Edit I: I might also add, the script's read-me file isn't very clear where exactly the .json file needs to be, if anywhere in particular. I haven't actually looked at its contents, but that's probably shooting myself in the foot if troubleshooting is what needs to be done, haha.
Edit II: As it so happens, when attempting to run the script from the current working PowerShell directory, even moving the .json file into the same folder as the script, the following occurs:
python simplenote2joplin.py --json-file notes.json --author 'insert name' --create-title --verbose-level 1 > all_notes_converted.enex
C:\Users\username\python_scripts\simplenote2joplin.py:147: SyntaxWarning: invalid escape sequence '\A'
temp_string = re.sub("\A" + pattern, "", temp_string)
C:\Users\username\python_scripts\simplenote2joplin.py:149: SyntaxWarning: invalid escape sequence '\Z'
temp_string = re.sub(pattern + "\Z", "", temp_string)
Traceback (most recent call last):
File "C:\Users\username\python_scripts\simplenote2joplin.py", line 367, in <module>
main(args)
File "C:\Users\username\python_scripts\simplenote2joplin.py", line 340, in main
enex_file = sne.process_file()
^^^^^^^^^^^^^^^^^^
File "C:\Users\username\python_scripts\simplenote2joplin.py", line 262, in process_file
simplenotes = json.load(jfp)
^^^^^^^^^^^^^^
File "C:\Python312\Lib\json\__init__.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^
File "C:\Python312\Lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 29419: character maps to <undefined>