Franklin source file error messages - how to read?

I’m very new to Franklin and to Julia. I’m finding it impossible to make use of the error message Franklin generates when it doesn’t like something in a website source file. Here is an example of my current quandary -

julia> serve()
ERROR: Base.Meta.ParseError("extra token \"here\" after end of expression")
  [1] #parse#3
    @ ./meta.jl:236 [inlined]
  [2] parse
    @ ./meta.jl:232 [inlined]
  [3] parse_code(code::SubString{String})
    @ Franklin ~/.julia/packages/Franklin/Az3qd/src/eval/run.jl:19
  [4] process_mddefs(blocks::Vector{Franklin.OCBlock}, isconfig::Bool, pagevar::Bool, isinternal::Bool)
    @ Franklin ~/.julia/packages/Franklin/Az3qd/src/converter/markdown/mddefs.jl:23
  [5] convert_md(mds::String, pre_lxdefs::Vector{Franklin.LxDef}; isrecursive::Bool, isinternal::Bool, isconfig::Bool, has_mddefs::Bool, pagevar::Bool, nostripp::Bool)
    @ Franklin ~/.julia/packages/Franklin/Az3qd/src/converter/markdown/md.jl:129
  [6] convert_md
    @ ~/.julia/packages/Franklin/Az3qd/src/converter/markdown/md.jl:23 [inlined]
  [7] process_config()
    @ Franklin ~/.julia/packages/Franklin/Az3qd/src/manager/file_utils.jl:15
  [8] serve(; clear::Bool, verb::Bool, port::Int64, single::Bool, prerender::Bool, nomess::Bool, is_final_pass::Bool, no_fail_prerender::Bool, eval_all::Bool, silent::Bool, cleanup::Bool, on_write::Franklin.var"#260#263", log::Bool, host::String, show_warnings::Bool, fail_on_warning::Bool, launch::Bool, no_set_paths::Bool, join_to_prepath::String)
    @ Franklin ~/.julia/packages/Franklin/Az3qd/src/manager/franklin.jl:98
  [9] serve()
    @ Franklin ~/.julia/packages/Franklin/Az3qd/src/manager/franklin.jl:49
 [10] top-level scope
    @ REPL[3]:1


I would be happy to study documentation about this but can find none.

Why is it not reported WHICH file and what line in that file is causing the problem? Isn’t this utterly basic?

I must be missing something really basic…


Franklin’s error messages can be a little bit cryptic sometimes. Try to check if you didn’t include some line with invalid syntax in one of your Julia codes.

1 Like

yes sometimes it is a bit hard to track down – but it seems to process your markdown definitions and/or config files. Do you by any chance have a file that contains the word “here” on a line (in a Julia or Markdown file) and could post said line (and maybe a few lines around)?

1 Like

Well, I suspect that if it were that easy, it would already have been done… :slight_smile: I think that when parsing complex documents it might be more difficult. Perhaps it’s a bit like, in real life, when you get lost, you don’t realize you’re lost until well after the point at which you took the wrong turn, and retracing your steps back to that point might also be difficult, because, well, you’re lost. (You can tell I spent some of last week getting lost in Boston!)

Perhaps you’d find the logging useful:


In your example I think Franklin is having trouble with one of your code blocks. Perhaps an omitted delimiter? As @kellertuer says, we could have a look at the source and might be able to help a bit more…

1 Like

First, thanks to all three of you for your responses. They are appreciated.

I’ve been thinking about this problem a lot since my post on Aug. 2.

I am a rank amateur in programming, whose training is in research method, cultural anthropology and psychotherapy, but I’ve been programing (8 diff. languages at last count - 9 with Julia) a looong time nevertheless. A parser that declares an error but can’t keep track of where in the source it’s doing its business so it can report the location of the error is just a bad parser. If it knows what it’s parsing it can also know where it found it. Even I can easily imagine how to program this.

Regarding the problem I reported: I found the errant “here” and fixed it. Now I have a truly impossible error message:

julia> serve()
ERROR: Base.Meta.ParseError("\"<\" is not a unary operator")

Suppose I have 200 source files, 50 html layout and or other files, etc. Now I’m supposed to find and manually examine each “<” to find the error? You can’t be serious.

If this is the best Julia’s markdown parser can do I’m retreating to python out of necessity. Time is my scarcest resource. I am strongly committed to learning Julia and using it, but I cannot afford long traipses through the great dismal swamp.

I’d be happy to look at the Franklin log file, using


but I have found no mention anywhere of where I might find the file.

Franklin is a package created by a user like you and me, who generously made it available to anyone.

If you believe that there is a crucial feature missing, I encourage you to open an issue on GitHub. Franklin is relatively new, and I imagine that the author would find your suggestion valuable.

Simply complaining about the absence of certain features and threatening to switch back to Python is not productive. If Python meets your needs, you should continue using it, especially if you have limited time available.


Well, no. Franklin’s highly skilled programmer has a cmputer sci. PhD and is a ML specialist. Maybe like you, but not like me. To put it differently, the lack of useful information in the error messages that I think are coming from Julia’s markdown compiler suggests a working environment where only the highly experienced or those with magical powers can thrive. I am not one of those.

My comment about retreating to Python was intended simply to communicate the seriousness of this problem I keep encountering.

I am not unappreciative. Franklin has a design and some features to which I am strongly attracted. I much want to use it. I have tried simply to point out the dysfunction I’m encountering, and to make clear that it’s not a minor thing. That’s legitimate, anywhere at anytime. I’ll try opening an issue, but that will be a new skill for this amateur. Likely a good one to acquire however…

I do not like the generalising tone here that yo use here.
From one single error message – that I for example currently can not reproduce, since we do not have any code that reproduces this you directly conclude that Julia markdown compiler is only for experts?

I would love to help, but that is at the current state mere magic.
What I think you have some Julia code (!) where you have only a variable on one side of the <. Could you at least provide the stack trace? That usually also tells you the calls where this happens and one can often find the place much more easily.
Currently the error message you provide is like a lamp lighting on the dashboard of a car. But you do not tells which car it is nor the color of the lamp, but we should infer, which part of the motor is broken.

Concerning the “written by a user” – sure Franklin is written by a programmer, still – being a package developer myself – some features take time, which as free time is probably limited.

At the same time I personally have not yet had the point in Franklin, where a parser error in either Julia or yawls files was not findable. But I often used the stack trace. Without a stack trace, I can only play fortune teller like I did above.