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

unable to launch patacrep on ubuntu 14.04 #234

Closed
angystardust opened this issue Jul 2, 2016 · 8 comments
Closed

unable to launch patacrep on ubuntu 14.04 #234

angystardust opened this issue Jul 2, 2016 · 8 comments

Comments

@angystardust
Copy link

Hi guys (sorry if I can't speak french).
I'm trying to run your wonderful software from my ubuntu 14.04 workstation but I can't successfuly generate a songbook because I always have this error:

$ songbook patadata/books/songbook_en.yaml 
INFO:patacrep.build:Building 'songbook_en.tex'…
Traceback (most recent call last):
  File "/usr/local/bin/songbook", line 9, in <module>
    load_entry_point('patacrep==5.0.0', 'console_scripts', 'songbook')()
  File "/usr/local/lib/python3.4/dist-packages/patacrep-5.0.0-py3.4.egg/patacrep/songbook/__main__.py", line 160, in main
  File "/usr/local/lib/python3.4/dist-packages/patacrep-5.0.0-py3.4.egg/patacrep/build.py", line 212, in build_steps
  File "/usr/local/lib/python3.4/dist-packages/patacrep-5.0.0-py3.4.egg/patacrep/build.py", line 231, in build_tex
  File "/usr/local/lib/python3.4/dist-packages/patacrep-5.0.0-py3.4.egg/patacrep/build.py", line 86, in write_tex
  File "/usr/local/lib/python3.4/dist-packages/patacrep-5.0.0-py3.4.egg/patacrep/content/__init__.py", line 268, in process_content
  File "/usr/local/lib/python3.4/dist-packages/patacrep-5.0.0-py3.4.egg/patacrep/files.py", line 102, in load_content_plugins
  File "/usr/lib/python3.4/functools.py", line 472, in wrapper
    result = user_function(*args, **kwds)
  File "/usr/local/lib/python3.4/dist-packages/patacrep-5.0.0-py3.4.egg/patacrep/files.py", line 147, in load_plugins
  File "/usr/local/lib/python3.4/dist-packages/patacrep-5.0.0-py3.4.egg/patacrep/files.py", line 92, in iter_modules
AttributeError: 'zipimport.zipimporter' object has no attribute 'find_spec'

I've followed all the steps found in the documentation (https://patacrep.readthedocs.io/fr/latest/installation.html) and I've installed all the LaTeX dependencies so I can't understand what the problem is.
Quoting the beatles...

Can you please help me? 😄

@oliverpool
Copy link
Contributor

Can you please help me? 😄

Sure!

It seems that some of your python module seem to be stored in zip files, and our code is not able to handle this special case.

I just pushed a fix in a separate branch, could you give it a try?
Something like pip3 install https://github.com/patacrep/patacrep/archive/zipimport_fix.zip (you may have to uninstall it first)

@angystardust
Copy link
Author

angystardust commented Jul 3, 2016

Wow! That's fixed it! Thanks a lot
Unfortunately now I'm having this error during the compliation of the songbook:

~/patadata$ songbook books/songbook_en.yaml 
INFO:patacrep.build:Building 'songbook_en.tex'…
INFO:patacrep.build:Building 'songbook_en.pdf'…
ERROR:root:Error while LaTeX compilation of "songbook_en.tex" (see songbook_en.log for more information).
ERROR:root:Running again with option '-v' may give more information.

In the log file, i can see this error:

! LaTeX Error: Filelicence.sty' not found.`

But the file is present in the patadata dir

$ find patadata/ -name licence.sty
patadata/templates/styles/licence.sty

However, I'm now able to successfully run a songbook compliation with the yaml file in the patacrep example directory.

~/patacrep/examples$ songbook example-songs.yaml 
INFO:patacrep.build:Building 'example-songs.tex'…
INFO:patacrep.build:Building 'example-songs.pdf'…
INFO:patacrep.build:Building indexes…
INFO:patacrep.build:Building 'example-songs.pdf'…
INFO:patacrep.build:Cleaning…

P.s.: what about patanet? Is it an abandoned project? I was hoping to see a stable release 'cause I would like to build up my own songbook website with it

@oliverpool
Copy link
Contributor

oliverpool commented Jul 4, 2016

Wow! That's fixed it! Thanks a lot

You're welcome! Thank you for your detailed bug-report :-)

Unfortunately now I'm having this error during the compliation of the songbook:

What is the content of songbook_en.tex ? (around the beginning : \def\input@path{)

what about patanet?

I worked quite a lot on patanet, but then switch to patacrep because we wanted to implement some improvements. I currently don't have much time and prefer spending it on maintaining patacrep than developing patanet. However if you want to develop patanet further, I would be happy to support you!

@oliverpool oliverpool reopened this Jul 4, 2016
@angystardust
Copy link
Author

Sorry @oliverpool but i'm not at my home workstation pc at the moment so I cannot verify the content of songbook_en.tex. I will let you know asap.
Thanks a lot for you superfast reply

P.s.: Unfortunately I'm not a dev guy so I cannot contribute to patanet...I hope someday you'll have more time to go on with the development ;)

@angystardust
Copy link
Author

Hi @oliverpool ! Here I am...maybe I've found what's the problem. This is the content of the tex file:

\def\input@path{ %
        {/home/angy/patadata/books/templates/styles/} %
        {/usr/local/lib/python3.4/dist-packages/patacrep/data/templates/styles/} %
}

But the template dir is under patadata instead of books dir; so I've done a recursive copy of the template dir under books and launched again the songbook command. This time the pdf was successfully created and I can open it with evince pdf reader.
So, in the end...is there an issue with the structure of the patadata dir?

P.s.: how can I compile a .sb file? it seems that songbook command only accepts yaml as input file...

@oliverpool
Copy link
Contributor

Ok,

actually, one path to the styles is missing (it should at the beginning, ending with patadata/books/../templates/styles/): what is the content of your songbook_en.yaml file? (especially the value of datadir: it should be ".." to go up of one folder)

Could you also re-run the compilation with the -v switch? (songbook -v songbook_en) Is WARNING:root:Ignoring non-existent datadir ... displayed at the beginning?

.sb files are not supported anymore (I suppose you are talking about the volume-*.sb: there is an open issue about them)

@oliverpool
Copy link
Contributor

@angystardust any news?

@angystardust
Copy link
Author

Sorry for the delay...
I've just make a couple of git pull of the patacrep and the patadata repository and now everything works great! Thank you so much for your support and keep on rockin' with the patacrep project ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants