Giter Club home page Giter Club logo

Comments (16)

tfredian avatar tfredian commented on May 25, 2024

Thanks for the report! We'll do more testing to see if we can come up
with a work around.

-tom

On 1/14/2016 12:59 PM, G. Ronchi wrote:

Using Windows 10 (or Windows Server 2012) with Python 35 64 bits, the
ctypes seems to generate some memory access violation as shown below

|treegetDefault() Traceback (most recent call last): File "",
line 1, in File
"C:\Anaconda3\lib\site-packages\mdsplus-7061-py35egg\MDSplus\mdsdatapy",
line 523, in decompile return _mimport('_tdishr',1)TdiDecompile(self)
File
"C:\Anaconda3\lib\site-packages\mdsplus-7061-py35egg\MDSplus_tdishrpy",
line 103, in TdiDecompile
status=TdiShrTdiDecompile(_Cpointer(descriptor(value)),_Cpointer(xd),_Cc_void_p(-1))
OSError: exception: access violation writing 0x00000000D94AE540 |

It's working fine with older windows versions and/or older python
versions as well as with Windows 10 + python 35 32 bits It probably
should be reported to the Python bug list, but I'm not able to produce
a simple example (like https://bugspythonorg/issue17310) that could
reproduce this bug


Reply to this email directly or view it on GitHub
#310.

from mdsplus.

tfredian avatar tfredian commented on May 25, 2024

Right now the python 3.5 version is really new and not available on most of the platforms. We will revisit this when it becomes more widely available on linux platforms were we can more easily debug the issue. For now I would recommend using python 3.4 if possible.

from mdsplus.

alkhwarizmi avatar alkhwarizmi commented on May 25, 2024

Hi all,

I did some high level investigations (I can't really look into the details because I don't have Visual Studio).

Let me say that I was not able to find much, however I have maybe found something that could point in the right direction: it seems that most of the packages of Anaconda Python 3.4 are compiled with Visual C++ 10.0 (VS 2010) while most of the packages of Anaconda Python 3.5 are compiled with Visual C++ 14.0 (VS 2015). Even if not stated explicitly, maybe Python itself within the Anaconda distribution is re-built with the same compiler, and maybe the two compilers have different ABI (seems strange to me).

In this case what could be needed to get MDSplus work with Anaconda Python 3.5 is to compile it with VS 2015.

Sincerely,

from mdsplus.

tfredian avatar tfredian commented on May 25, 2024

Try the latest alpha release.
On Oct 23, 2016 8:08 AM, AlKhwarizmi [email protected] wrote:Hi all,

I did some high level investigations (I can't really look into the details because I don't have Visual Studio).

Let me say that I was not able to find much, however I have maybe found something that could point in the right direction: it seems that most of the packages of Anaconda Python 3.4 are compiled with Visual C++ 10.0 (VS 2010) while most of the packages of Anaconda Python 3.5 are compiled with Visual C++ 14.0 (VS 2015). Even if not state explicitly, maybe Python itself within the Anaconda distribution is re-built with the same compiler, and maybe the two compilers have different ABI (seems srtange to me).

In this case what could be needed to get MDSplus work with Anaconda Python 3.5 is to compile it with VS 2015.

Sincerely,

—You are receiving this because you were assigned.Reply to this email directly, view it on GitHub, or mute the thread.

from mdsplus.

ktritz avatar ktritz commented on May 25, 2024

Tried both the latest stable and alpha release, still see access violation bug when trying to use openTree on Windows 10 + Anaconda/Python 3.6

from mdsplus.

joshStillerman avatar joshStillerman commented on May 25, 2024

I just did a clean install of anaconda python
`Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 5.1.0 -- An enhanced Interactive Python`

and MDSplus:

MDSplus version: 7.1.93 Git branch: alpha Git tag: alpha_release-7-1-93 View: https://github.com/MDSplus/mdsplus/tree/alpha_release-7-1-93 Download: https://github.com/MDSplus/mdsplus/archive/alpha_release-7-1-93.tar.gz Git commit: dd3f02dfc0dc1d3780b89772f107ef4ff842e64b Build date: Thu Feb 23 08:06:07 EST 2017
and both Trees and Connections work: - am I missing something here?
`
In [1]: from MDSplus import *

In [2]: c = Connection('alcdaq.psfc.mit.edu')

In [3]: x = c.get('1+3')

In [4]: x
Out[4]: 4

In [5]: t = Tree('main', -1)

In [6]: t
Out[6]: Tree("MAIN",-1,"Normal")

In [7]: t.getDefault()
Out[7]: \MAIN::TOP
`
I did have to do:
pip install MDSplus after I installed the kit.

from mdsplus.

ktritz avatar ktritz commented on May 25, 2024

My problem was with the thin client method:
c = mds.Connection('skylark')
c.openTree(tree, shot)

Seems to work fine on Windows 7 64bit, python 3.6, doesn't work on Windows 10 64bit, python 3.6. This is a pretty fresh anaconda installation tested with both the stable and alpha MDSplus install.

from mdsplus.

joshStillerman avatar joshStillerman commented on May 25, 2024

from mdsplus.

ktritz avatar ktritz commented on May 25, 2024

Ok, the code you showed used the Tree instead of the openTree method, so I wasn't sure whether you tested the thin client method.

from mdsplus.

ktritz avatar ktritz commented on May 25, 2024

Here's the exact output, Windows 10, 64 bit, Anaconda w/ Python 3.6:

In [3]: c = mds.Connection('skylark.pppl.gov')

In [4]: c.openTree('wf', 141398)

OSError Traceback (most recent call last)
in ()
----> 1 c.openTree('wf', 141398)

C:\Anaconda3\lib\site-packages\mdsplus_alpha-7.1.93-py3.6.egg\MDSplus\connection.py in openTree(self, tree, shot, mode)
202 else: # stay compatible with old TreeOpen
203 status=self.get("TreeOpen($,$)",tree,shot)
--> 204 if not ((status & 1)==1):
205 raise _Exceptions.statusToException(status)
206

C:\Anaconda3\lib\site-packages\mdsplus_alpha-7.1.93-py3.6.egg\MDSplus\mdsdata.py in and(self, y)
251 """And: x.and(y) <==> x&y
252 @rtype: Data"""
--> 253 return Data.execute('$ & $',self,y)
254
255 def div(self,y):

C:\Anaconda3\lib\site-packages\mdsplus_alpha-7.1.93-py3.6.egg\MDSplus\mdsdata.py in execute(expr, *args)
485 """Execute and expression inserting optional arguments into the expression before evaluating
486 @rtype: Data"""
--> 487 return _tdishr.TdiExecute(expr,args)
488 execute=staticmethod(execute)
489

C:\Anaconda3\lib\site-packages\mdsplus_alpha-7.1.93-py3.6.egg\MDSplus_tdishr.py in TdiExecute(expression, args)
41 def TdiExecute(expression,args=None):
42 """Compile and execute a TDI expression. Format: TdiExecute('expression-string')"""
---> 43 return _TdiShrFun(_TdiShr.TdiExecute,"Error executing",expression,args)
44
45 def TdiDecompile(expression):

C:\Anaconda3\lib\site-packages\mdsplus_alpha-7.1.93-py3.6.egg\MDSplus_tdishr.py in _TdiShrFun(function, errormessage, expression, args)
29 xd = _descriptor.descriptor_xd()
30 arguments = [_C.byref(descriptor(expression))]+parseArguments(args)+[_C.byref(xd),_C.c_void_p(-1)]
---> 31 status = function(*arguments)
32 if (status & 1 != 0):
33 return xd.value

OSError: exception: access violation writing 0x0000000067929020

In [5]: mds.version
Out[5]: '7.1.93'

from mdsplus.

joshStillerman avatar joshStillerman commented on May 25, 2024

from mdsplus.

ktritz avatar ktritz commented on May 25, 2024

from mdsplus.

MDSplusBuilder avatar MDSplusBuilder commented on May 25, 2024

from mdsplus.

ktritz avatar ktritz commented on May 25, 2024

from mdsplus.

ktritz avatar ktritz commented on May 25, 2024

from mdsplus.

MDSplusBuilder avatar MDSplusBuilder commented on May 25, 2024

from mdsplus.

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.