I'm guessing tex2lyx is assuming that ~/.lyx (or ~/.lyx2.1) is my userdir. If it does not exist and I use -userdir on the commandline to start LyX, tex2lyx gets confused:
(on Ubuntu with LyX 2.1git) LayoutFile.cpp (110): LayoutFileList::Read: unable to find textclass file `textclass.lst'. LayoutFile.cpp (171): LayoutFileList::Read: no textclasses found! ModuleList.cpp (129): unable to find modules file `lyxmodules.lst'. No modules will be available. Creating file /tmp/lyx_tmpdir.dEIjCLkk2933/Buffer_importStringHq2933.lyx support/lassert.cpp (43): ASSERTION haveClass(classname) VIOLATED IN /home/vbox/lyxbuilds/master/repo/src/LayoutFile.cpp:94 Assertion triggered in void lyx::doAssert(const char*, const char*, long int) by failing check "false" in file /home/vbox/lyxbuilds/master/repo/src/support/lassert.cpp:45 Error: Document format failure ---------------------------------------- /tmp/lyx_tmpdir.dEIjCLkk2933/Buffer_importFileAD2933.lyx is not a readable LyX document. note to self: when doing a git bisect make sure I reproduce the problem in the same way (and specify the same user dir or no user dir throughout); or be prepared to waste time. Scott