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

Error when trying to print source code - AttributeError: 'QPrintDialog' object has no attribute 'addEnabledOption' #4824

Closed
neilsf1975 opened this issue Jul 27, 2017 · 3 comments

Comments

@neilsf1975
Copy link

Description

I want to print a source code file. When I go to File->Print in Spyder I see the error message that I presume is linked to this in some manner.

What steps will reproduce the problem?

It doesn't seem reproducible in that I've now closed and re-opened the file and the print function works as expected. To get this issue I opened the source file, and then I highlight items near the top of the file like "from utilities import *" and right-clicked on utilities to choose go to definition, as I wanted to also view those files. I then went to File->Print and this error was generated. I can't supply any of the files for commericial-in-confidence reasons.

What is the expected output? What do you see instead?
I expected to see a file dialog, instead I got the error below.

Please provide any additional information below

File "C:\Users\fra256\AppData\Local\Continuum\Anaconda3\lib\site-packages\spyder\plugins\editor.py", line 1932, in print_file
printDialog.addEnabledOption(QAbstractPrintDialog.PrintSelection)
AttributeError: 'QPrintDialog' object has no attribute 'addEnabledOption'

Version and main components

  • Spyder Version: 3.2.0
  • Python Version: 3.6.0
  • Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies

pyflakes >=0.6.0 :  1.5.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.1.3 (OK)
pandas >=0.13.1  :  0.19.2 (OK)
numpy >=1.7      :  1.11.3 (OK)
sphinx >=0.6.6   :  1.5.1 (OK)
rope >=0.9.4     :  0.9.4-1 (OK)
jedi >=0.9.0     :  0.9.0 (OK)
nbconvert >=4.0  :  4.2.0 (OK)
sympy >=0.7.3    :  1.0 (OK)
cython >=0.21    :  0.25.2 (OK)
qtconsole >=4.2.0:  4.2.1 (OK)
IPython >=4.0    :  5.1.0 (OK)
pylint >=0.25    :  1.6.4 (OK)

@ccordoba12
Copy link
Member

Thanks for reporting. We'll fix this error in Spyder 3.2.1

@dalthviz, please take a look at this problem.

@dalthviz
Copy link
Member

Hi @neilsf1975 , could you test if the fix works for you?

@ccordoba12
Copy link
Member

He meant pull request #4830.

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

No branches or pull requests

3 participants