So excited to see this, thank you!

Trying to get it to work, but am stymied.
I created a test notebook in Note Station - 4 notes, including 2 attachments.
When I run the script it creates the appropriate directories and places the attached files in the attachments folder, but no md (or any other) files are created.

Here is what the output of the script looks like.
Perhaps someone can point me in the right direction?

Found pandoc 1.19.2.4
Extracting notes from /home/raven/notestation-to-joplin/src/20200616_125920_2699_me.nsx
Reading notebook Joplin Import Test Notebook
Reading note 1/4: A Joplin Import note with an attachment
Reading note 2/4: A Joplin Import note with embedded links
Reading note 3/4: A Joplin Import note with an embedded image
Reading note 4/4: A Joplin Import test note
Writing note 1/4 in Joplin Import Test Notebook: A Joplin Import note with an attachment
Traceback (most recent call last):
File "nsx2joplin.py", line 463, in
nsx.export_to_joplin(token=joplin_token, nsx_content=nsx_content)
File "nsx2joplin.py", line 406, in export_to_joplin
note["content"] = asyncio.run(
File "/usr/lib/python3.8/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 608, in run_until_complete
return future.result()
File "nsx2joplin.py", line 345, in create_resource
res = await joplin.create_resource(
File "/home/raven/.local/lib/python3.8/site-packages/joplin_api/core.py", line 474, in create_resource
return await self.query('post', '/resources/', **data)
File "/home/raven/.local/lib/python3.8/site-packages/joplin_api/core.py", line 106, in query
res = await self.client.post(self.JOPLIN_HOST + '/resources',
File "/home/raven/.local/lib/python3.8/site-packages/httpx/_client.py", line 1374, in post
return await self.request(
File "/home/raven/.local/lib/python3.8/site-packages/httpx/_client.py", line 1147, in request
response = await self.send(
File "/home/raven/.local/lib/python3.8/site-packages/httpx/_client.py", line 1168, in send
response = await self.send_handling_redirects(
File "/home/raven/.local/lib/python3.8/site-packages/httpx/_client.py", line 1195, in send_handling_redirects
response = await self.send_handling_auth(
File "/home/raven/.local/lib/python3.8/site-packages/httpx/_client.py", line 1232, in send_handling_auth
response = await self.send_single_request(request, timeout)
File "/home/raven/.local/lib/python3.8/site-packages/httpx/_client.py", line 1264, in send_single_request
) = await transport.request(
File "/home/raven/.local/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 152, in request
response = await connection.request(
File "/home/raven/.local/lib/python3.8/site-packages/httpcore/_async/connection.py", line 78, in request
return await self.connection.request(method, url, headers, stream, timeout)
File "/home/raven/.local/lib/python3.8/site-packages/httpcore/_async/http11.py", line 62, in request
) = await self._receive_response(timeout)
File "/home/raven/.local/lib/python3.8/site-packages/httpcore/_async/http11.py", line 115, in _receive_response
event = await self._receive_event(timeout)
File "/home/raven/.local/lib/python3.8/site-packages/httpcore/_async/http11.py", line 145, in _receive_event
data = await self.socket.read(self.READ_NUM_BYTES, timeout)
File "/home/raven/.local/lib/python3.8/site-packages/httpcore/_backends/asyncio.py", line 134, in read
return await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
return fut.result()
File "/usr/lib/python3.8/asyncio/streams.py", line 701, in read
await self._wait_for_data('read')
File "/usr/lib/python3.8/asyncio/streams.py", line 534, in _wait_for_data
await self._waiter
RuntimeError: Task <Task pending name='Task-4255' coro=<StreamReader.read() running at /usr/lib/python3.8/asyncio/streams.py:701> cb=[_release_waiter(()]>)() at /usr/lib/python3.8/asyncio/tasks.py:429]> got Future attached to a different loop

1 Like