npindi icon indicating copy to clipboard operation
npindi copied to clipboard

INDI.py crashed

Open gnthibault opened this issue 7 years ago • 1 comments

Dear Geehalel,

First let me thank you for the awesome work you did. Before looking at the projet, I did not even know that PyQt featured such awesome capabilities. You basically rebuilt a basic mechanical simulation render engine + planetarium software from scratch, I think it is really outstanding work, and I am probably going to use this a lot.

Although I found that it is a great idea to have a native indi python client, I fear a bit more about the maintainability of such approach, and I will try to see if I can reimplement the simulator your wrote with the regular swig version of the client. I think I managed to connect some things correctly for now, but I did not managed to launch the view3D app to run in a new thread (using Threading, I got a dark window), I think there is a lot more for me to understand about your software.

Back to npindi apps, when I try to run the mount3d app with the indi telescope simulator, it ends up crashing with:

npindi: Telescope Simulator: [INFO] Telescope slew is complete. Tracking... Traceback (most recent call last): File "/home/user/projects/npindi/apps/mount3D/view3D.py", line 83, in setCoord pon = INDI.IUFindOnSwitch(self.pierside) File "/home/user/anaconda3/envs/npindi/lib/python3.6/site-packages/indi/INDI.py", line 154, in IUFindOnSwitch for sp in svp.vp.values(): AttributeError: 'NoneType' object has no attribute 'vp' Aborted (core dumped)

Am I doing something wrong here ? Thank you in advance for your help, but I wanted to let you know that I am not in a hurry of getting an answer though, I need quite a bit of time to understand how you wrote the simulator.

gnthibault avatar May 31 '18 06:05 gnthibault

Hi, I made the mount3D demo mainly as an exercise to learn PyQt3D stuff, and tried to keep it as simple as possible to maybe reuse it in some programming course or astronomy tutorial. I remembered the first time I used an equatorial mount and it is not so easy to understand how axis are moving when you don't have one under eyes. I agree that having a native python indi client may need more work to maintain, and I'm not sure if I will do. I won't make any ''official'' release anyway. Now it is there, someone may be interested in making it evolve. If you want to use the simulator part with the swig version you will face problems with Qt and Threading. When you use Qt I believe you should use QThread only, otherwise you may lose some events. The best would be to add the baseclientqt class in the swig wrapping, it did not exist when I made the swig client, but it uses a QThread and Qt signaling if I remember. Concerning the npinidi mount3D demo, the problem is that the Telescope Simulator does not expose a PIER_SIDE property, which I believed was required in telescope drivers. Thus you may use eqmod in simulation mode, or comment the PIER_SIDE use in the source code and computes its value before calling the model setCoords method. I will update all that in some weeks, I'm going to be busy for a while before summer.

geehalel avatar Jun 01 '18 17:06 geehalel