Giter Club home page Giter Club logo

Comments (7)

The-Compiler avatar The-Compiler commented on September 7, 2024

After I forced the theme to sphinxdoc, I get this:

Warning, treated as error:
/home/florian/proj/pytest-qt/docs/index.rst:234: WARNING: autodoc: failed to import class 'QtBot' from module 'pytestqt.plugin'; the following exception was raised:
Traceback (most recent call last):
  File "/home/florian/proj/pytest-qt/.tox/docs/lib/python3.4/site-packages/sphinx/ext/autodoc.py", line 385, in import_object
    __import__(self.modname)
  File "/home/florian/proj/pytest-qt/pytestqt/plugin.py", line 57, in <module>
    class QtBot(object):
  File "/home/florian/proj/pytest-qt/pytestqt/plugin.py", line 49, in _inject_qtest_methods
    method = create_qtest_proxy_method(method_name)
  File "/home/florian/proj/pytest-qt/pytestqt/plugin.py", line 26, in create_qtest_proxy_method
    functools.update_wrapper(result, qtest_method)
  File "/home/florian/proj/pytest-qt/.tox/docs/lib/python3.4/functools.py", line 64, in update_wrapper
    setattr(wrapper, attr, value)
TypeError: __qualname__ must be set to a string object

ERROR: InvocationError: '/home/florian/proj/pytest-qt/.tox/docs/bin/sphinx-build -q -E -W -b html . _build'

from pytest-qt.

nicoddemus avatar nicoddemus commented on September 7, 2024

Hmmm weird. I will take a look, thanks!

from pytest-qt.

nicoddemus avatar nicoddemus commented on September 7, 2024

An old local virtual environment was the reason I didn't notice it before. 😄 Thanks!

from pytest-qt.

The-Compiler avatar The-Compiler commented on September 7, 2024

I still get the TypeError in the comment though.

from pytest-qt.

nicoddemus avatar nicoddemus commented on September 7, 2024

Hmm, I forgot to mention I ran that in Python 2.7... are you using 3.4?

Weird is that the error happens in functools... perhaps that name is not a string, but bytes?

from pytest-qt.

The-Compiler avatar The-Compiler commented on September 7, 2024

It worked fine with basepython = python2 in tox.ini indeed - I'm on Arch Linux which uses Python 3 for /usr/bin/python.

I was confused why that error shows up when building docs only but not with real usage, and then remembered the Mock used so no Qt backend is needed for building the docs. Then I found out this didn't handle __qualname__ (and __annotations__) and added support for that in #50 - after that, docs seem to build fine here.

from pytest-qt.

nicoddemus avatar nicoddemus commented on September 7, 2024

Excellent, thanks! 😄

from pytest-qt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.