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

AttributeError: 'module' object has no attribute 'filename_to_title' #21

Open
darkleaf opened this issue Nov 2, 2018 · 4 comments
Open

Comments

@darkleaf
Copy link

darkleaf commented Nov 2, 2018

Hi.
I have a error.

pip install git+https://github.com/twardoch/mkdocs-combine.git

mkdocscombine -o mydocs.pd
Traceback (most recent call last):
  File "/usr/local/bin/mkdocscombine", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/mkdocs_combine/cli/mkdocscombine.py", line 160, in main
    mkdocs_combiner.combine()
  File "/usr/local/lib/python2.7/site-packages/mkdocs_combine/mkdocs_combiner.py", line 169, in combine
    pages = self.flatten_pages(self.config[u'nav'])
  File "/usr/local/lib/python2.7/site-packages/mkdocs_combine/mkdocs_combiner.py", line 150, in flatten_pages
    level + 1)
  File "/usr/local/lib/python2.7/site-packages/mkdocs_combine/mkdocs_combiner.py", line 120, in flatten_pages
    u'title': u'%s {: .page-title}' % mkdocs.utils.filename_to_title(page),
AttributeError: 'module' object has no attribute 'filename_to_title'
backports-abc==0.5
Click==7.0
futures==3.2.0
Jinja2==2.10
livereload==2.5.2
Markdown==3.0.1
MarkupSafe==1.0
mkdocs==1.0.4
PyYAML==3.13
singledispatch==3.4.0.3
six==1.11.0
tornado==5.1.1
@Ir1d
Copy link

Ir1d commented Nov 3, 2018

i think you should try python3

@darkleaf
Copy link
Author

darkleaf commented Nov 3, 2018

I move project to sphinx =)

@darkleaf darkleaf closed this as completed Nov 3, 2018
@JDDoesDev
Copy link

I'm running into the same issue. It looks like there was a change in Mkdocs that removed this function. mkdocs/mkdocs@5e59af5#diff-730512090b1f15175b2e4e521d35b776

Will this be fixed in a near release?

@darkleaf darkleaf reopened this Nov 25, 2018
@twardoch
Copy link
Owner

twardoch commented Nov 25, 2018

MkDocs has undergone major changes since I've worked on this tool. My work has been mostly forking the initial mkdocs-pandoc project, subsequent merging of various commits from different other forks, and some minor changes that I needed.

But with the current MkDocs, I believe that the functionality of mkdocs-combine should be completely rewritten in form of an MkDocs plugin. This would have a number of advantages, including the fact that an MkDocs plugin world be more resilient to changes in MkDocs than this current tool is.

I have no plans to update mkdocs-combine but if people contribute pull requests, I'll merge them.

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

4 participants