Giter Site home page Giter Site logo

bear-app-to-notion's People

Contributors

hyunhwan-jeong avatar le0park avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bear-app-to-notion's Issues

Whitespaced filenames lead to script's inability to recognize the filepath

As I found the script doesn't recognize converted path names:

if an image in Bear had whitespaces: "Screenshot 202021-11-05 20at 2022.35.55.png", after export they will be replaced with percent sign: "Screenshot%202021-11-05%20at%2022.35.55.png".
Screenshot 2022-01-05 at 09 47 33

Which eventually gives an error FileNotFoundError: [Errno 2] No such file or directory: '/foo/bar/Screenshot%202021-11-05%20at%2022.35.55.png'

HTTPError on client.get_block(page_url)

Something is wrong here, not working.

File "script.py", line 13, in <module>
    page = client.get_block(page_url)
  File "/opt/homebrew/anaconda3/envs/test_m1/lib/python3.8/site-packages/notion/client.py", line 169, in get_block
    block = self.get_record_data("block", block_id, force_refresh=force_refresh)
  File "/opt/homebrew/anaconda3/envs/test_m1/lib/python3.8/site-packages/notion/client.py", line 162, in get_record_data
    return self._store.get(table, id, force_refresh=force_refresh)
  File "/opt/homebrew/anaconda3/envs/test_m1/lib/python3.8/site-packages/notion/store.py", line 184, in get
    self.call_load_page_chunk(id)
  File "/opt/homebrew/anaconda3/envs/test_m1/lib/python3.8/site-packages/notion/store.py", line 286, in call_load_page_chunk
    recordmap = self._client.post("loadPageChunk", data).json()["recordMap"]
  File "/opt/homebrew/anaconda3/envs/test_m1/lib/python3.8/site-packages/notion/client.py", line 260, in post
    raise HTTPError(
requests.exceptions.HTTPError: Invalid input.

Error: unexpected keyword argument 'method_whitelist'

Tried to run the code, but got this.

python script.py
Traceback (most recent call last):
  File "/Users/username/git/bear-app-to-notion/script.py", line 12, in <module>
    client = NotionClient(token_v2=token_v2)
  File "/Users/username/miniconda3/lib/python3.9/site-packages/notion/client.py", line 77, in __init__
    self.session = create_session(client_specified_retry)
  File "/Users/username/miniconda3/lib/python3.9/site-packages/notion/client.py", line 39, in create_session
    retry = Retry(
TypeError: __init__() got an unexpected keyword argument 'method_whitelist'

First, issue though is that it is pretty hard to find the cookie. See attached screenshot, is it this?
Screenshot 2023-09-06 at 11 54 47

Also, I am on python 3.9, is this an issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.