Here are the steps I follow to reproduce the issue:
1. I edited a component “mytest.comp” (different component name inside ):
component mysiggen ;
pin in float to_sawtooth;
pin in float to_triangle;
option userspace yes;
license “GPL”;
;;
void user_mainloop(void) {
rtapiprintmsg(RTAPIMSGERR, “mysiggen: vor while(1)\n”);
while(1) {
usleep(100000);
FORALLINSTS() {
rtapiprintmsg(RTAPIMSGERR, “halusermainloop: saege=%lf, drei=%lf\n”,
tosawtooth , totriangle );
}
}
}
2. I tried to compile:
halcompile –compile mytest.comp
This is what I expected to happen:
output: Component name (mysiggen) does not match filename (mytest)
This is what happened instead:
output:
Traceback (most recent call last):
File “/home/cncuser/CNC/NC/linuxCNC/bin/halcompile”, line 1416, in
main()
File “/home/cncuser/CNC/NC/linuxCNC/bin/halcompile”, line 1411, in main
os.unlink(outfile)
TypeError: coercing to Unicode: need string or buffer, NoneType found
I think two things happen here which shouldn’t:
1. The appropriate error message is hidden by the unlink of a not existing file.
2. The error system-message is not found and results in the printed error.
I worked around this by adding “if outfile != None:” between “try:” and “os.unlink(outfile)” in halcompile: line 1410
Information about my hardware and software:
* I am using this Linux distribution and version (often, shown by lsb_release -a):
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.4 (stretch)
Release: 9.4
Codename: stretch
* I am using this kernel version (shown by uname -a):
Linux debian94 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux
* I am running …
* [ ] A binary version from linuxcnc.org (including buildbot.linuxcnc.org)
* [X ] A binary I built myself
* [ ] A binary version from some other source besides linuxcnc.org
* I am using this LinuxCNC version (shown in package manager or, for git versions, scripts/get-version-from-git): v2.8.0-pre1-3695-g159ce9c3c
* I am using this user interface (GUI) (e.g., AXIS, Touchy, gmoccapy, etc): AXIS
* I am using this interface hardware vendor and chipset (e.g., parallel port, ethernet port, FPGA card):
only simulation in a VM
#1 – jepler 于 2018-04-27
That’ll teach me to try to port to python 3, it’s most likely what
introduced this bug.
Thanks for the assignment Andy, I’ll look at it next week at the soonest.
>