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

Unknown string format error when interpreting dates #8

Open
JoeyPearlman opened this issue Apr 27, 2021 · 0 comments
Open

Unknown string format error when interpreting dates #8

JoeyPearlman opened this issue Apr 27, 2021 · 0 comments

Comments

@JoeyPearlman
Copy link

JoeyPearlman commented Apr 27, 2021

Hi, thanks so much for this tool! I just tried to run it, and ended up getting an error that prevents anything from being placed in the md or md/dailynotes folder. Here's the output from Terminal, edited to remove my name.

Not sure what I did wrong, would appreciate any help to fix! This is my first time using a Python script :)

[username]@Joeys-MacBook-Air rj2obs-main % python r2o.py JoeyNotes.json
Pass 1: scan all pages
100%|██████████████████████████████████████████████████████████████████████████████████████████████| 847/847 [00:00<00:00, 57592.21it/s]
Pass 2: track blockrefs
  0%|                                                                                                           | 0/847 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/Users/[username]/Downloads/rj2obs-main/r2o.py", line 149, in <module>
    expand_children(p, uid2block, referenced_uids)
  File "/Users/[username]/Downloads/rj2obs-main/r2o.py", line 105, in expand_children
    lines.extend(expand_children(b, uid2block, referenced_uids, level + 1))
  File "/Users/[username]/Downloads/rj2obs-main/r2o.py", line 105, in expand_children
    lines.extend(expand_children(b, uid2block, referenced_uids, level + 1))
  File "/Users/[username]/Downloads/rj2obs-main/r2o.py", line 105, in expand_children
    lines.extend(expand_children(b, uid2block, referenced_uids, level + 1))
  File "/Users/[username]/Downloads/rj2obs-main/r2o.py", line 97, in expand_children
    s = prefix + replace_blockrefs(s, uid2block, referenced_uids) + postfix
  File "/Users/[username]/Downloads/rj2obs-main/r2o.py", line 69, in replace_blockrefs
    return replace_daylinks(new_s)
  File "/Users/[username]/Downloads/rj2obs-main/r2o.py", line 38, in replace_daylinks
    dt = parse(m.group(2))
  File "/usr/local/lib/python3.9/site-packages/dateutil/parser/_parser.py", line 1358, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/dateutil/parser/_parser.py", line 649, in parse
    raise ValueError("Unknown string format:", timestr)
ValueError: ('Unknown string format:', 'Febuary 11th, 2021')

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

1 participant