agilescientific / striplog

Lithology and stratigraphic logs for wells or outcrop.

Home Page:https://code.agilescientific.com/striplog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Legend.from_csv errno22

alexcolyer opened this issue · comments

Hi,

I get an error when I am trying to follow the tutorial for making a legend. When I use the following code I get the [Errno 22] Invalid argument. However, I took most of the code from the tutorial, the only change I made was to remove duplicate legend items.

from striplog import Legend, Lexicon, Interval, Component, Decor, Striplog

l = u"""Colour, Component lithology
#F7E9A6, Sandstone
#FF99CC, Anhydrite
#DBD6BC, Heterolithic 
#FF4C4A, Volcanic
#86F0B6, Conglomerate
"""
legend = Legend.from_csv(l)

It will try to interpret the first argument as a filename. You have to say, legend = Legend.from_csv(text=l)

That is great, thanks