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

Do we need to remove the UID from all files and folders ourselves? #39

Open
ToontjeM opened this issue Jul 12, 2023 · 9 comments
Open

Comments

@ToontjeM
Copy link

The script apparently doesn't do that?

@arozx
Copy link

arozx commented Jul 12, 2023

Yes the script does not have this feature. I'm pretty sure the software is not being actively maintained so I created a fork with a few changes which automatically removes UID's as well as other improvements.

@ToontjeM
Copy link
Author

Will try that one later today. Thanks!

@Aragur
Copy link

Aragur commented Jul 14, 2023

Yes the script does not have this feature. I'm pretty sure the software is not being actively maintained so I created a fork with a few changes which automatically removes UID's as well as other improvements.

Your script also doesn't remove any UIDs

@arozx
Copy link

arozx commented Jul 14, 2023

I forgot to mention that you have to unzip the folder once. This is because when you download the zip from notion it gives you a zip nested in another zip for some reason.

Yes the script does not have this feature. I'm pretty sure the software is not being actively maintained so I created a fork with a few changes which automatically removes UID's as well as other improvements.

Your script also doesn't remove any UIDs

@Aragur
Copy link

Aragur commented Jul 14, 2023

@arozx Thanks, got it.
But now it's crashing with the following error:

Traceback (most recent call last):
  File "/Users/giesel/Downloads/notion_2_obsidan-master/N2O.py", line 96, in <module>
    mdTitle = N2Omodule.N2Ocsv(csvFile)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/giesel/Downloads/notion_2_obsidan-master/N2Omodule.py", line 98, in N2Ocsv
    for row in reader: # I don't know how this works but it does what I want
  File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/csv.py", line 110, in __next__
    self.fieldnames
  File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/csv.py", line 97, in fieldnames
    self._fieldnames = next(self.reader)
                       ^^^^^^^^^^^^^^^^^
  File "<frozen codecs>", line 322, in decode
  File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/encodings/utf_8_sig.py", line 69, in _buffer_decode
    return codecs.utf_8_decode(input, errors, final)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xad in position 45: invalid start byte

@arozx
Copy link

arozx commented Jul 14, 2023

This might work though I have no way of testing for MacOS.
https://github.com/arozx/notion_2_obsidan/tree/testing

@Aragur
Copy link

Aragur commented Jul 14, 2023

@arozx Same issue

Traceback (most recent call last):
  File "/Users/giesel/Downloads/notion_2_obsidan-testing/N2O.py", line 96, in <module>
    mdTitle = N2Omodule.N2Ocsv(csvFile)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/giesel/Downloads/notion_2_obsidan-testing/N2Omodule.py", line 96, in N2Ocsv
    reader = DictReader(StringIO(csvFile.read().decode('utf-8-sig')), delimiter=',', quotechar='"')
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/encodings/utf_8_sig.py", line 23, in decode
    (output, consumed) = codecs.utf_8_decode(input, errors, True)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xad in position 45: invalid start byte

@arozx
Copy link

arozx commented Jul 14, 2023

One workaround could be to use a Virtual Machine such as virtual box to run the program on a Linux or windows machine. You could also try using GitHub code spaces or replit to run the application or use a windows or Linux computer. I am unable to reproduce the error, so unfortunately do not have a proper solution to the issue.

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xad in position 45: invalid start byte

@TheoOliveira
Copy link

TheoOliveira commented Feb 10, 2024

See if that helps guys, one thing i'd like to point it out. The dev took his time to develop this we should come not asking and demanding features but willing to help how to implement that or help somehow. He's doing for free, remember that.

https://gist.github.com/TheoOliveira/74e9fea0c1a8538d23b3bfce943e8e2e

In case theres is interest i can make a PR to integrate that to the current script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants