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

Vale CLI crashes on start: E100 [vocab] Runtime error 'Base' does not exist #500

Closed
LoganWalls opened this issue Oct 15, 2022 · 9 comments
Closed

Comments

@LoganWalls
Copy link

First off, thank you for the great tool! I've found vale very useful as a writing aid.

I'm having trouble getting vale to work with my current setup. vale sync works, but if I try to ls-config or lint a file, vale crashes with the error:

E100 [vocab] Runtime error  'Base' does not exist
❯ vale sync
 SUCCESS  Downloaded package 'Microsoft'                                                                                                                                                   
 SUCCESS  Downloaded package 'proselint'                                                                                                                                                   
 SUCCESS  Downloaded package 'write-good'                                                                                                                                                  
Downloading packages [3/3] ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ 100% | 2s
❯ vale ls-config
E100 [vocab] Runtime error

'Base' does not exist

Execution stopped with code 1.
❯ vale foo.md
E100 [vocab] Runtime error

'Base' does not exist

Execution stopped with code 1.
;$HOME/.vale.ini
StylesPath = .config/vale/styles

MinAlertLevel = suggestion
Vocab = Base

Packages = Microsoft, proselint, write-good

[*]
BasedOnStyles = Vale, Microsoft, proselint, write-good

; Academic writing uses first person by convention
Microsoft.We = NO
Microsoft.FirstPerson = NO

; More relavent for tech writing.
Microsoft.Acronyms = NO

; Already handled by Microsoft.Passive
write-good.Passive = NO

; Already handled by write-good.Weasle
proselint.Very = NO
  • OS: MacOS 12.6 (Monterey)
  • Install method: nix
  • Vale version: 2.20.2

Any advice on how to resolve this?

Thank you!

@jdkato
Copy link
Member

jdkato commented Oct 26, 2022

I can't reproduce this.

What does .config/vale/styles contain?

@LoganWalls
Copy link
Author

LoganWalls commented Oct 26, 2022

Thank you for the response! See below:

❯ tree ~/.config/vale/styles
├── Microsoft
│  ├── Accessibility.yml
│  ├── Acronyms.yml
│  ├── Adverbs.yml
│  ├── AMPM.yml
│  ├── Auto.yml
│  ├── Avoid.yml
│  ├── ComplexWords.yml
│  ├── Contractions.yml
│  ├── Dashes.yml
│  ├── DateFormat.yml
│  ├── DateNumbers.yml
│  ├── DateOrder.yml
│  ├── Ellipses.yml
│  ├── FirstPerson.yml
│  ├── Foreign.yml
│  ├── Gender.yml
│  ├── GenderBias.yml
│  ├── GeneralURL.yml
│  ├── HeadingAcronyms.yml
│  ├── HeadingColons.yml
│  ├── HeadingPunctuation.yml
│  ├── Headings.yml
│  ├── Hyphens.yml
│  ├── meta.json
│  ├── Negative.yml
│  ├── Ordinal.yml
│  ├── OxfordComma.yml
│  ├── Passive.yml
│  ├── Percentages.yml
│  ├── Quotes.yml
│  ├── RangeFormat.yml
│  ├── Ranges.yml
│  ├── RangeTime.yml
│  ├── Semicolon.yml
│  ├── SentenceLength.yml
│  ├── Spacing.yml
│  ├── Suspended.yml
│  ├── Terms.yml
│  ├── Units.yml
│  ├── URLFormat.yml
│  ├── Vocab.yml
│  ├── We.yml
│  └── Wordiness.yml
├── proselint
│  ├── Airlinese.yml
│  ├── AnimalLabels.yml
│  ├── Annotations.yml
│  ├── Apologizing.yml
│  ├── Archaisms.yml
│  ├── But.yml
│  ├── Cliches.yml
│  ├── CorporateSpeak.yml
│  ├── Currency.yml
│  ├── Cursing.yml
│  ├── DateCase.yml
│  ├── DateMidnight.yml
│  ├── DateRedundancy.yml
│  ├── DateSpacing.yml
│  ├── DenizenLabels.yml
│  ├── Diacritical.yml
│  ├── GenderBias.yml
│  ├── GroupTerms.yml
│  ├── Hedging.yml
│  ├── Hyperbole.yml
│  ├── Jargon.yml
│  ├── LGBTOffensive.yml
│  ├── LGBTTerms.yml
│  ├── Malapropisms.yml
│  ├── meta.json
│  ├── Needless.yml
│  ├── Nonwords.yml
│  ├── Oxymorons.yml
│  ├── P-Value.yml
│  ├── RASSyndrome.yml
│  ├── README.md
│  ├── Skunked.yml
│  ├── Spelling.yml
│  ├── Typography.yml
│  ├── Uncomparables.yml
│  └── Very.yml
└── write-good
   ├── Cliches.yml
   ├── E-Prime.yml
   ├── Illusions.yml
   ├── meta.json
   ├── Passive.yml
   ├── README.md
   ├── So.yml
   ├── ThereIs.yml
   ├── TooWordy.yml
   └── Weasel.yml

@daneov
Copy link

daneov commented Oct 28, 2022

With the following docker file I experience the same:

Dockerfile:

 FROM debian:bullseye-slim

 ARG VALE_VERSION=2.20.2
 RUN apt update && apt install git wget -y && \
     rm -rf /var/lib/apt/lists/* && \
      wget https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz && \
     tar -xvzf vale_${VALE_VERSION}_Linux_64-bit.tar.gz -C /usr/local/sbin

.vale.ini:

StylesPath = styles

MinAlertLevel = suggestion
Vocab = Base

Packages = proselint, write-good, Readability

[*.md]
BasedOnStyles = Vale, proselint, write-good, Readability

Commands:

docker build -t vale:test .
cd <dir-to-check>
docker run -it --rm -v $PWD:/src -w /src --rm vale:test
root:/src # vale sync
root:/src # vale .

@daneov
Copy link

daneov commented Oct 28, 2022

Not sure if the intended method, but thanks to a pointer on https://vale.sh/docs/topics/vocab/ I was able to at least get some linting.

Each Vocab is a single folder (stored at /Vocab//) consisting of two plain-text files—accept.txt and reject.txt—that contain one word, phrase, or regular expression per line.

So I did:

mkdir -p styles/Vocab/Base
touch styles/Vocab/Base/{accept,reject}.txt

And after that, running vale . worked

@LoganWalls
Copy link
Author

Thanks @daneov! That fix worked for me.

@jdkato Is there anything wrong with this approach? Are we missing any of Vale's functionality by using the empty Base vocabularies?

Thanks!

@jdkato
Copy link
Member

jdkato commented Oct 31, 2022

No, there's nothing wrong with this approach. However, you don't need to use a Vocab if you don't want to (the Vocab = Base line in your config).

I've removed it from the default option in the config generator to avoid confusion.

@jdkato jdkato closed this as completed Oct 31, 2022
@ernstki
Copy link

ernstki commented Aug 22, 2024

In case anyone is coming here from a MacPorts installation, where (through no fault of the authors) 2.28.x appears to be the latest version available…

The location of vocabularies has changed since 3.x. The documentation does indeed plainly reflect this, but due to banner blindness, I failed to see it.

A screenshot of the "Folder structure" section of the "Vocabularies" article from Vale's documentation, with the statement "prior to 3.0, vocabularies were stored in <StylesPath>/Vocab" outlined by a bright-colored box

@ccoVeille
Copy link
Contributor

The documentation does indeed plainly reflect this, but due to banner blindness, I failed to see it.

Side remark: I'm glad you made me discover the banner blindness concept. I'm suffering from it for decades and I had no idea it was common and it had a name

@ernstki
Copy link

ernstki commented Aug 22, 2024

Side remark: I'm glad you made me discover the banner blindness concept. I'm suffering from it for decades and I had no idea it was common and it had a name

I have no specialised training in graphic communication design or visual perception, but my feeling is that it's the solid-color background that does it.

A margin highlight like how GitHub styles their "Note" and "Warning" alert boxes seems OK, or else a very light background with a bolder colored border. Sample size of one. ;)

@errata-ai errata-ai locked and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants