frictionlessdata / livemark

Data presentation framework for Python that generates static sites from extended Markdown with interactive charts, tables, scripts, and other features
https://livemark.frictionlessdata.io
MIT License
95 stars 8 forks source link

Improve error message for incorrectly set path #207

Open aivuk opened 2 years ago

aivuk commented 2 years ago

I created a very simple livemark project:


ls -l
total 8
-rw-rw-r-- 1 aivuk aivuk 16 Jun 13 10:33 index.md
-rw-rw-r-- 1 aivuk aivuk 55 Jun 13 10:33 livemark.yaml
➜  livemark-tutorial $ cat livemark.yaml  
pages:
  items:
    - name: Test
      path: index.md
➜  livemark-tutorial $ cat livemark.yaml 
pages:
  items:
    - name: Test
      path: index.md

but when I try to run livemark on the folder with livemark start if fails with:

'NoneType' object has no attribute 'get_plugin'

@roll

roll commented 2 years ago

Hi @aivuk it should be run from the project root

Although I need to improve the error message

aivuk commented 2 years ago

Sorry, what do you mean? I have a folder called livemark-tutorial with just two files, index.md and livemark.yaml. I did run the command inside the folder livemark-tutorial. If I ran on livemark repository it works, but in this other folder it doesn't.

roll commented 2 years ago

@aivuk Nervermind - I read it wrongly

Let me try

roll commented 2 years ago

@aivuk The path should be abstract (withouh an extension md/html):

➜  livemark-tutorial $ cat livemark.yaml 
pages:
  items:
    - name: Test
      path: index
roll commented 2 years ago

It works for me:

livemark --version
0.88.1
aivuk commented 2 years ago

Yes, now it works removing the .md extension, thanks!

roll commented 2 years ago

Let's keep it to improve the error message

aivuk commented 2 years ago

Ah sorry, I didn't noticed that you changed the title and thought you create a new issue.