# Python script for importing notes from Synology's Note Station into Joplin

**URL:** <https://discourse.joplinapp.org/t/python-script-for-importing-notes-from-synologys-note-station-into-joplin/6605>\
**Category:** Apps\
**Created:** [5 March 2020 21:32 UTC](https://discourse.joplinapp.org/t/python-script-for-importing-notes-from-synologys-note-station-into-joplin/6605 "2020-03-05T21:32:30Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![bananasareyellow](https://avatars.discourse-cdn.com/v4/letter/b/71e660/32.png) [@bananasareyellow](https://discourse.joplinapp.org/u/bananasareyellow)\
**Post date:** [13 March 2021 17:45 UTC](https://discourse.joplinapp.org/t/python-script-for-importing-notes-from-synologys-note-station-into-joplin/6605/17 "2021-03-13T17:45:35Z")

</div>

Thank you @zerosandones for working your way through this. I'm now following your path. Looking at the GitHub repository, it seems the author has not worked on this since 02-Mar-2020, so none of your fixes have been applied. Anyway, I'm stuck at a new error.

I changed the import statement from:

```auto
from joplin_api import JoplinApi

```

to

```auto
from joplin_api import JoplinApiSync as JoplinApi

```

Then I changed the 3 occurrences of:

```auto
res = await some_function

```

to remove the `await` like this:

```auto
res = some_function

```

Now it gets through all my "Reading note" steps, and then it gets through 174/701 of my "Writing note" steps before failing:

```auto
Traceback (most recent call last):
  File "nsx2joplin.py", line 467, in <module>
    nsx.export_to_joplin(token=joplin_token, nsx_content=nsx_content)
  File "nsx2joplin.py", line 410, in export_to_joplin
    note["content"] = asyncio.run(
  File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "nsx2joplin.py", line 348, in create_resource
    res = joplin.create_resource(
  File "/home/david/.local/lib/python3.8/site-packages/joplin_api/core_sync.py", line 508, in create_resource
    return self.query('post', '/resources/', **data)
  File "/home/david/.local/lib/python3.8/site-packages/joplin_api/core_sync.py", line 123, in query
    res.raise_for_status()
  File "/home/david/.local/lib/python3.8/site-packages/httpx/_models.py", line 1108, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: 500 Server Error: Internal Server Error for url: http://127.0.0.1:41184/resources?token=5e9fa90fa40a75d5033b2dc4e8258e108b6a91a361c30a245cd587f5f8fe1456f03c2b08ddd49e50d85b6a6c8904b0f0c144b2b5b333174aa6c2b7405395cc61
For more information check: https://httpstatuses.com/500

```

I'm using Python 3.8.6.

Any idea what's causing this?

---

_[View the full topic](https://discourse.joplinapp.org/t/python-script-for-importing-notes-from-synologys-note-station-into-joplin/6605)._
