halcompile error

More
05 May 2016 20:52 - 06 May 2016 02:39 #74283 by joekline9
halcompile error was created by joekline9
I can't get halcompile to work for a userpace comp. See error below:

joe@Shermill:~$ sudo halcompile --install --userspace testusr.comp
Traceback (most recent call last):
File "/usr/bin/halcompile", line 1353, in <module>
main()
File "/usr/bin/halcompile", line 1322, in main
process(f, mode, outfile)
File "/usr/bin/halcompile", line 1192, in process
a, b = parse(filename)
File "/usr/bin/halcompile", line 417, in parse
a, b = f.split("\n;;\n", 1)
ValueError: need more than 1 value to unpack

I am on Debian Wheezy and linuxcnc 2.7.4
Attachments:
Last edit: 06 May 2016 02:39 by joekline9.

Please Log in or Create an account to join the conversation.

More
06 May 2016 18:27 #74313 by joekline9
Replied by joekline9 on topic halcompile error
:)
Well I found the problem. DOS style line endings.
I just had to do Save As in Gedit and choose Unix/Linux not windows Line endings.

It would be nice if Halcompile would just ignore the '/r' but............

Please Log in or Create an account to join the conversation.

More
06 May 2016 19:32 #74315 by Todd Zuercher
Replied by Todd Zuercher on topic halcompile error
Be nicer if Microsoft would just use the same endings as every one else ;)

Please Log in or Create an account to join the conversation.

More
22 May 2024 19:57 #301163 by Thayloreing
Replied by Thayloreing on topic halcompile error
Could you tell me how you can solve the problem? I'm trying to compile a component but it's giving me the same error, I'm a beginner if you could explain me step by step I'd really appreciate it

Please Log in or Create an account to join the conversation.

More
22 May 2024 23:07 #301167 by tommylight
Replied by tommylight on topic halcompile error
The simple answer is
Do not use windows to edit machine files.
There should be some software that fixes such issues, but i have never used it so no idea what it is called, try searching google for
linux fix dos style endings

Please Log in or Create an account to join the conversation.

More
23 May 2024 01:05 #301176 by cornholio
Replied by cornholio on topic halcompile error
Geany can fix those issues.

mcedit can do it, need to sudo apt install mc (mc is a great curses (text) based file manager, can also change ownership, permissions and much more)

dos2unix is a cli utility that can do it.

Couple of methods with sed source edoras.sdsu.edu/doc/sed-oneliners.html
TEXT CONVERSION AND SUBSTITUTION:

# IN UNIX ENVIRONMENT: convert DOS newlines (CR/LF) to Unix format
sed 's/.$//' # assumes that all lines end with CR/LF
sed 's/^M$//' # in bash/tcsh, press Ctrl-V then Ctrl-M
sed 's/\x0D$//' # gsed 3.02.80, but top script is easier

Please Log in or Create an account to join the conversation.

More
24 May 2024 02:01 #301275 by Thayloreing
Replied by Thayloreing on topic halcompile error
I got the file on Github, the encoder.c from the original linuxcnc, I'm editing it, then this error appeared, but when I get the original code and try to reconpile it gives the same error, I haven't used Windows at any point

Please Log in or Create an account to join the conversation.

More
24 May 2024 02:12 #301278 by tommylight
Replied by tommylight on topic halcompile error
That begs the question, how did you download the file?
Raw?

Please Log in or Create an account to join the conversation.

More
24 May 2024 02:38 #301280 by Thayloreing
Replied by Thayloreing on topic halcompile error
I copied the file and pasted it into a text file named encoder.comp

Please Log in or Create an account to join the conversation.

More
24 May 2024 02:44 #301281 by tommylight
Replied by tommylight on topic halcompile error
OK, i thought so, so two options:
1 use the RAW button on github to download files
2 use a text editor to paste stuff to, not the wordpads and office suits, and not on windows except if using notepad++
The following user(s) said Thank You: Thayloreing

Please Log in or Create an account to join the conversation.

Time to create page: 0.116 seconds
Powered by Kunena Forum