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

Exception TypeError when running a script more than once #65

Closed
andres333 opened this issue Jun 10, 2016 · 2 comments
Closed

Exception TypeError when running a script more than once #65

andres333 opened this issue Jun 10, 2016 · 2 comments

Comments

@andres333
Copy link

andres333 commented Jun 10, 2016

Hi,

I have an error message when i run a script more than once.

Here the script, as simple as it could be:

# -*- coding: utf-8 -*-
import sys
import os
import matplotlib.pyplot as plt
import pyzdde.zdde as pyz

ln = pyz.createLink()
print(ln.zGetVersion()) # example
ln.close()

And here what is printed in a freshly started iPython console. Two runs are shown:

Python 2.7.11 |Anaconda 4.0.0 (64-bit)| (default, Feb 16 2016, 09:58:36) [MSC v.1500 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 4.1.2 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
%guiref   -> A brief reference about the graphical user interface.

runfile('C:/Users/xxxx/Desktop/Temp/PyzDDE_tests/test_00.py', wdir='C:/Users/xxxx/Desktop/Temp/PyzDDE_tests')
160608

runfile('C:/Users/xxxx/Desktop/Temp/PyzDDE_tests/test_00.py', wdir='C:/Users/xxxx/Desktop/Temp/PyzDDE_tests')
160608
Exception TypeError: "'NoneType' object is not callable" in <bound method PyZDDE.__del__ of PyZDDE(appName='', appNum=1, connection=False, macroPath=None)> ignored

As you can see, I am using Anaconda, Python 2.7, Spyder.

Interestingly this does not happen the first time that I run the code.

I have tried to follow the recommendations in earlier posts ( #40) but it does not seem to have an effect.

I would appreciate any suggestions.

All the best,
andres

@indranilsinharoy
Copy link
Collaborator

I'm not sure what's going on.

Please try running the script in a "dedicated Python console" in spyder [Preferences >> Run >> Console >> Execute in a new dedicated Python console] and see if you can still reproduce the error.

Please do let me know.

Thank you,
Best regards,
Indranil.

@andres333
Copy link
Author

Hi Indranil, sorry for the delay.

In a dedicated console this error does not appear. Also, the first time i run it in a non-dedicated console, it does not appear, only from the second time on. that may be the reason why it does not appear on a dedicated console.

Best & thanks.
Andrés

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