romilly / logseq-migration

get and use local copies of roam assets for logseq import
MIT License
6 stars 1 forks source link

Hoping to get this working #2

Open seanstews opened 1 year ago

seanstews commented 1 year ago

Thank for creating this! I have been scouring the internet for something like it so I can make the switch to Logseq.

I ran this today and got the following error:

version 0.2 Traceback (most recent call last): File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Python310\Scripts\localise_assets.exe__main__.py", line 7, in File "C:\Python310\lib\site-packages\logseq\migration\migrater.py", line 143, in main migrate(vault_directory, debug_level) File "C:\Python310\lib\site-packages\logseq\migration\migrater.py", line 153, in migrate Migrator(debug_level).migrate(vault_directory) File "C:\Python310\lib\site-packages\logseq\migration\migrater.py", line 30, in migrate self.process_files(assets_dir, assets_from_page_dir, directory) File "C:\Python310\lib\site-packages\logseq\migration\migrater.py", line 38, in process_files self.process_file(assets_dir, assets_from_page_dir, file, File "C:\Python310\lib\site-packages\logseq\migration\migrater.py", line 53, in process_file self.process_assets(file_path, lines, File "C:\Python310\lib\site-packages\logseq\migration\migrater.py", line 61, in process_assets content = self.update_markdown_content(asset_dir, File "C:\Python310\lib\site-packages\logseq\migration\migrater.py", line 72, in update_markdown_content content = md.readlines() File "C:\Python310\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 2184: character maps to

It put 1-2 images in the assets folder in my Logseq directory then stopped.

Apologize in advance for my noobness - and fair warning, I may need "Explain Like I'm 5" instructions for some steps.

Hope I can figure out how to get this working!

romilly commented 1 year ago

It sounds as if this is the same problem as issue #1, in which case I am really glad to have a second chance to fix it.

I believe it's a Windows file encoding problem.

Is the data in the graph you're migrating confidential or private? If you're willing to share the data with me, I could run tests at this end.

If not, I'll have to think about the best way to proceed.

seanstews commented 1 year ago

Wow - thank you so much for the fast reply and offer to help!

My notes are not confidential so I'd be happy to send them over to you directly via email or DM.

Where shall I send and would you like the JSON or Markdown export from Roam?

Thanks again - been struggling with this for weeks!

On Wed, Jul 13, 2022 at 12:41 AM Romilly Cocking @.***> wrote:

It sounds as if this is the same problem as issue #1 https://github.com/romilly/logseq-migration/issues/1, in which case I am really glad to have a second chance to fix it.

I believe it's a Windows file encoding problem.

Is the data in the graph you're migrating confidential or private? If you're willing to share the data with me, I could run tests at this end.

If not, I'll have to think about the best way to proceed.

— Reply to this email directly, view it on GitHub https://github.com/romilly/logseq-migration/issues/2#issuecomment-1182758828, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVI7GEVG3KS65ZLWPJGTLKLVTZCGHANCNFSM53I44FXA . You are receiving this because you authored the thread.Message ID: @.***>

romilly commented 1 year ago

Happy to help, and hopeful that I can sort this out, for both our sakes!

As I said, I suspect that the problem is to do with Windows file encoding. If it's not too much trouble, it would be best if you could send me both the json file and a zipped version of the directory you imported into, since it's posible that my machine will do the import differently than yours.

If the files are not too large, email would be best: I'm romilly.cocking@gmail.com

seanstews commented 1 year ago

Thank you so much!

I'll email over both in the next hour or two :)

On Wed, Jul 13, 2022 at 1:17 PM Romilly Cocking @.***> wrote:

Happy to help, and hopeful that I can sort this out, for bitgh our sakes!

As I said, I suspect that the problem is to do with Windows file encoding. If it's not too much trouble, it would be best if you could send me both the json file and a zipped version of the directory you imported into, since it's posible tha my machine will do the uimport differently than yours.

If the files are not too large, email would be best: I'm @.***

— Reply to this email directly, view it on GitHub https://github.com/romilly/logseq-migration/issues/2#issuecomment-1183482184, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVI7GEQMXMTTTCE2NSCKNJ3VT323RANCNFSM53I44FXA . You are receiving this because you authored the thread.Message ID: @.***>

richd67 commented 1 year ago

Did you find a solution to the problem, still interested in trying to get this working?

romilly commented 1 year ago

No, working with another user we got close, but there's still an unsolved problem. I have not looked at it for a few days. I've been trying to deal with a dying Hard Disk. I hope to get back to it next week.

On Thu, 18 Aug 2022 at 13:20, Prof D @.***> wrote:

Did you find a solution to the problem, still interested in trying to get this working?

— Reply to this email directly, view it on GitHub https://github.com/romilly/logseq-migration/issues/2#issuecomment-1219424297, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEOPQIMW3D566ZK6MCFGLVZYTCXANCNFSM53I44FXA . You are receiving this because you commented.Message ID: @.***>

-- @. @. skype:romilly.cocking web: http://blog.rareschool.com/

seanstews commented 1 year ago

Hi Romilly,

I very much appreciate all your follow through and efforts on this!

I was actually able to get this resolved by using this script that someone shared on the Logseq forums recently: http://hyperphor.com/ammdi/RoamAway

Thank you again for everything! Sean

On Thu, Aug 18, 2022 at 8:34 AM Romilly Cocking @.***> wrote:

No, working with another user we got close, but there's still an unsolved problem. I have not looked at it for a few days. I've been trying to deal with a dying Hard Disk. I hope to get back to it next week.

On Thu, 18 Aug 2022 at 13:20, Prof D @.***> wrote:

Did you find a solution to the problem, still interested in trying to get this working?

— Reply to this email directly, view it on GitHub < https://github.com/romilly/logseq-migration/issues/2#issuecomment-1219424297 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AABEOPQIMW3D566ZK6MCFGLVZYTCXANCNFSM53I44FXA

. You are receiving this because you commented.Message ID: @.***>

-- @. @. skype:romilly.cocking web: http://blog.rareschool.com/

— Reply to this email directly, view it on GitHub https://github.com/romilly/logseq-migration/issues/2#issuecomment-1219438020, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVI7GERBZ3TUHL6D3HZ4AYDVZYUUPANCNFSM53I44FXA . You are receiving this because you authored the thread.Message ID: @.***>

richd67 commented 1 year ago

Sean, solution looks great if you are on a Mac☹️. Unfortunately I am on Windows?

seanstews commented 1 year ago

Ahh I am too - I actually never tried the script myself since I'm a noob and would probably mess something up. The creator just did my files manually using the script (I suppose on a mac?)

Thanks!

On Thu, Aug 18, 2022 at 3:07 PM Prof D @.***> wrote:

Sean, solution looks great if you are on a Mac☹️. Unfortunately I am on Windows?

— Reply to this email directly, view it on GitHub https://github.com/romilly/logseq-migration/issues/2#issuecomment-1219846304, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVI7GEXTIQZ2STHYXFEJ26DVZ2CYJANCNFSM53I44FXA . You are receiving this because you authored the thread.Message ID: @.***>

romilly commented 1 year ago

It sounds as if this is the same problem as issue #1, in which case I am really glad to have a second chance to fix it.

I believe it's a Windows file encoding problem.

Is the data in the graph you're migrating confidential or private? If you're willing to share the data with me, I could run tests at this end.

If not, I'll have to think about the best way to proceed.

On Mon, 11 Jul 2022 at 22:37, seanstews @.***> wrote:

Thank for creating this! I have been scouring the internet for something like it so I can make the switch to Logseq.

I ran this today and got the following error:

version 0.2 Traceback (most recent call last): File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Python310\lib\runpy.py", line 86, in

run_code exec(code, run_globals) File "C:\Python310\Scripts\localise_assets.exe_main.py", line 7, in File "C:\Python310\lib\site-packages\logseq\migration\migrater.py", line 143, in main migrate(vault_directory, debug_level) File "C:\Python310\lib\site-packages\logseq\migration\migrater.py", line 153, in migrate Migrator(debug_level).migrate(vault_directory) File "C:\Python310\lib\site-packages\logseq\migration\migrater.py", line 30, in migrate self.process_files(assets_dir, assets_from_page_dir, directory) File "C:\Python310\lib\site-packages\logseq\migration\migrater.py", line 38, in process_files self.process_file(assets_dir, assets_from_page_dir, file, File "C:\Python310\lib\site-packages\logseq\migration\migrater.py", line 53, in process_file self.process_assets(file_path, lines, File "C:\Python310\lib\site-packages\logseq\migration\migrater.py", line 61, in process_assets content = self.update_markdown_content(asset_dir, File "C:\Python310\lib\site-packages\logseq\migration\migrater.py", line 72, in update_markdown_content content = md.readlines() File "C:\Python310\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 2184: character maps to

It put 1-2 images in the assets folder in my Logseq directory then stopped.

Apologize in advance for my noobness - and fair warning, I may need "Explain Like I'm 5" instructions for some steps.

Hope I can figure out how to get this working!

— Reply to this email directly, view it on GitHub https://github.com/romilly/logseq-migration/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEOPVZIXHUIIPINSB3OMDVTSHZFANCNFSM53I44FXA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- @. @. skype:romilly.cocking web: http://blog.rareschool.com/