Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: expected str #4

Open
cykloCNC opened this issue Jun 17, 2022 · 4 comments
Open

TypeError: expected str #4

cykloCNC opened this issue Jun 17, 2022 · 4 comments

Comments

@cykloCNC
Copy link

Hello,thank for your script!
But i have problem running it.

lisak@lisak1:/media/lisak/Data$ ./toolscrips.py toolsf360.tools
Traceback (most recent call last):
File "./toolscrips.py", line 260, in
main()
File "./toolscrips.py", line 237, in main
output_file = open(output_filename, 'w')
TypeError: expected str, bytes or os.PathLike object, not list

is this my fault somehow or is s glitch in script? Thank you for answer.

@ntc490
Copy link
Owner

ntc490 commented Aug 5, 2022

First, I'm assuming you renamed ttable.py to toolscripts.py and this is the code from my repo...
I think you may have downloaded a version that contains a bug. I introduced an error with a merge on Jan 4th. It took me a bit to realize the issue and fix it as I don't use the software anymore. Please try the latest and greatest version - c53cdf4. The bug was fixed in 39e4f54, so that version or newer should work.

@cykloCNC
Copy link
Author

cykloCNC commented Aug 6, 2022

Hello, thx for answer. I find solution. Your script requeries minimum version of python 3.8. I had 3.6.x on linux. Now everything works as expected. Thanks a lot for the script.
Maybe you can put python version requirement in description. It took me quite some time to figure out :)

@ntc490
Copy link
Owner

ntc490 commented Aug 7, 2022

Thanks for the information. I'll consider adding a note, but I'd like to understand the error so I'm not missing something. I can run it with an older version of Python to see.
It looks like maybe you were running the version of my script that had a logic error. It shouldn't have been calling that line of code since you didn't specify an output file in the script invocation. I looked back through the history and didn't see a version with that line of code at line 237, though... very close but not quite.
Thank you for providing feedback and I hope you're making something cool with your CNC!

@cykloCNC
Copy link
Author

cykloCNC commented Aug 8, 2022

I used only the newest version of your script. Error on PY 3.6.x you can see at the beginning here. With PY 3.8.2 proglem is gone. Friend tried on win with Py 3.9.x and no problem too.
"I hope you're making something cool with your CNC!" - well, it was long journey, from machine design/build/work. But its great now. Still have much to learn. But direct export of tools from F360 with props is really great and really usefull with big tool libraries. THX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants