Anyone Seen This Glitch With CQ-editor (or is my CQ-editor / CadQuery / Python 3 Slightly Broken) ??

141 views
Skip to first unread message

Steve Petrie

unread,
Aug 25, 2023, 3:04:35 PM8/25/23
to CadQuery - Mailing List, Steve Petrie

Greetings To The CadQuery Community,

I'm contacting the CadQuery mailing list to ask if anyone else has experienced a weird glitch I occasionally have with CQ-editor.

Glitch scenario:

1. in CQ-editor Run > Render and see a report of some python syntax error.

2. Use an external editor to make a fix for the python syntax error, in the CadQuery source code module.

3. Use the CQ-editor file open icon, to load the revised source code module.

4. Use CQ-editor Run > Render and see the same report of the same python syntax error.

5. Close CQ-editor and launch CQ-editor again from a linux command shell with this command:

   user@debian:/media/user/32ec11e8-082c-4ca5-b751-dc2852f9d5e2/home/steve/apps/CQ-editor-0.2/CQ-editor$ ./CQ-editor

7. Use the CQ-editor file open icon, to load revised source code module.

8. Use CQ-editor Run > Render and do NOT see the same report of the same python syntax error.

* * *

* * *

Is CQ-editor retaining some context about the previous Run > Render that's causing it to report a python syntax error no longer present in the currently-loaded python module ??

Given how very widely CQ-editor is being used, my first thought is that there must be some way to tell CQ-editor to refresh its python context ??

I tried clicking the CQ-editor "Clear all" icon, but it didn't seem to fix the spurious report of the python syntax error.

Given that I have a workaround that takes only a few seconds, by closing and restarting CQ-editor, a workaround that clears the spurious repeated report of the python syntax error, I'm not too bothered by this issue.

Still, it's an annoyance with such excellent software ...

So, I would like to find out if other CadQuery users have encountered the same weird glitch. Because if not, perhaps there could be something broken in my CadQuery / CQ-editor / python 3 installation.

* * *
* * *

Using CQ-editor version 0.2.0 on:

   linux kernel: Linux 5.10.0-20-amd64 x86_64

   Debian: GNU/Linux 11 (bullseye)

* * *
* * *

Using CQ-editor > Help > About CQ-editor reports:
...
PyQt GUI for CadQuery.
Version: 0.2.0.
Source Code: https://github.com/CadQuery/CQ-editor
...

Using CQ-editor > Help > Help > Check for CadQuery updates reports:
...
There are newer versions of cadquery available on github:
2.3.1
2.3.0
2.2.0
...

* * *
* * *

I don't know for sure the CadQuery version. I understand that CadQuery comes bundled with a CadQuery installation.

However, I looked under the folder where I have CQ-editor installed:

   /media/user/32ec11e8-082c-4ca5-b751-dc2852f9d5e2/home/steve/apps/CQ-editor-0.2/

but I can't find anything that looks to me like a CadQuery executable(s).

I know this is the location of the CQ-editor I'm using, because I launch CQ-editor from a linux command shell with this command:

   user@debian:/media/user/32ec11e8-082c-4ca5-b751-dc2852f9d5e2/home/steve/apps/CQ-editor-0.2/CQ-editor$ ./CQ-editor

I looked on the CadQuery github website but couldn't find a way to list all previous CadQuery versions.

I don't run CadQuery from a command shell and I don't remember if I ever installed a CadQuery outside of the CQ-editor installation.

* * *
* * *

Currently using CQ-editor and CadQuery to build my second CQ model, the Wood Wheel Maker, a piece of equipment that enables a person quickly to make a conveniently-handled package of firewood logs in the from of a circular 48-inch diameter log bundle, secured by a tight steel band around the wheel's circumference.

I attach two (2)  graphics of the first part of the Wood Wheel maker:

   wwm_LogCageHalfHoop.brep.01.png
   wwm_LogCageHalfHoop.brep.02.png

My previous CadQuery model, also built using CQ-editor, illustrates an Elevated Bicycle Expressway, located in the airspace above a major arterial roadway.

The attached PDF begins with a graphic of the CadQuery model of this Elevated Bikeway:

   Elevated Bicycle Expressway (bikeway) - 20221007.odt.pdf

* * *
* * *

Any suggestions about the weird CQ-editor glitch gratefully appreciated.

Steve Petrie

ape...@aspetrie.net
Toronto, Ontario, Canada

wwm_LogCageHalfHoop.brep.01.png
wwm_LogCageHalfHoop.brep.02.png
Elevated Bicycle Expressway (bikeway) - 20221007.odt.pdf

Steve Petrie

unread,
Aug 26, 2023, 5:45:07 AM8/26/23
to CadQuery - Mailing List, Steve Petrie

Greetings To The CadQuery Community,

Further to my email of 2023-08-25 subject "Anyone Seen This Glitch With CQ-editor (or is my CQ-editor / CadQuery / Python 3 Slightly Broken) ??".

I believe I may have diagnosed the cause of the weird occasional glitch I have been encountering with CQ-editor.

I believe the glitch was caused by my using an external editor to edit my python source files.

Hopefully, checking the CQ-editor Code Editor > Autoreload checkbox will eliminate the weird glitch I have been encountering.

* * *
* * *

The glitch seems to be that occasionally, I edit a secondary python source file that is imported by the top-level python source file that I explicitly get CQ-editor to reload, prior to doing a Run > Render.

Because I edit my python source files, using an editor external to CQ-editor, when I edit the secondary imported python source file, CQ-editor seems not to know that the secondary source file has changed.

My diagnosis is that CQ-editor only knows that a python source file has changed, if that source file gets changed by the source file editor internal to CQ-editor.

My assumption is that, when I do a Render > Run, CQ-editor is not checking the actual secondary (imported) source file on disk, to see if that source file has changed there. Because CQ-editor assumes that the user is using CQ-editor's built-in source file editor.

Since CQ-editor is working closely with the python language implementation, perhaps some internal pre-interpreted representation of a secondary source file that CQ-editor thinks is unchanged, gets invoked through CQ-editor ??

If this is true, then the results of the Run > Render will not reflect the current state of the secondary dource file on disk.

* * *
* * *

I looked into CQ-editor Edit > Preferences and saw that Code Editor > Autoreload checkbox was UNCHECKED.

I have enabled the Code Editor > Autoreload checkbox, assuming that this will force CQ-editor always to reload all python source files, prior to Run > Render.

Hopefully, checking this Code Editor > Autoreload checkbox will eliminate the weird glitch I have been encountering.

Steve Petrie

ape...@aspetrie.net
Toronto, Ontario, Canada

-------- Original Message --------

Subject: Anyone Seen This Glitch With CQ-editor (or is my CQ-editor / CadQuery / Python 3 Slightly Broken) ??
Date: 2023-08-25 15:04
From: Steve Petrie <ape...@aspetrie.net>
To: CadQuery - Mailing List <cadq...@googlegroups.com>
Reply all
Reply to author
Forward
0 new messages