fogleman / axi Goto Github PK
View Code? Open in Web Editor NEWLibrary for working with the AxiDraw v3 pen plotter.
License: MIT License
Library for working with the AxiDraw v3 pen plotter.
License: MIT License
installed axi on MacOS High Sierra 10.13.
tried to run the dragon curve demo and getting the error below.
$ python dragon_curve.py
Traceback (most recent call last):
File "dragon_curve.py", line 1, in
import axi
File "/Users/IWU/GitHub/axi/axi/init.py", line 2, in
from .drawing import Drawing
File "/Users/IWU/GitHub/axi/axi/drawing.py", line 10, in
import cairocffi as cairo
File "/anaconda2/envs/axidraw/lib/python2.7/site-packages/cairocffi/init.py", line 41, in
cairo = dlopen(ffi, 'cairo', 'cairo-2')
File "/anaconda2/envs/axidraw/lib/python2.7/site-packages/cairocffi/init.py", line 38, in dlopen
raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names))
OSError: dlopen() failed to load a library: cairo / cairo-2
axi goto 10 10
Traceback (most recent call last):
File "/usr/local/bin/axi", line 9, in
load_entry_point('axi==0.1', 'console_scripts', 'axi')()
File "/Users/jojiabraham/code/axi/axi/main.py", line 34, in main
device.goto(x, y)
File "/Users/jojiabraham/code/axi/axi/device.py", line 97, in goto
px, py = self.read_position()
File "/Users/jojiabraham/code/axi/axi/device.py", line 124, in read_position
a, b = map(int, response.split(','))
ValueError: invalid literal for int() with base 10: "!8 Err: Unknown command 'QS:5153'"
Hi,
Code looks great but I got problems to run it. Here the warnings I got
f:\Program Files (x86)\Python 3.5\python.exe" F:/axidraw/axi/examples/dragon_curve.py
Traceback (most recent call last):
File "F:/axidraw/axi/examples/dragon_curve.py", line 15, in
main(12)
File "F:/axidraw/axi/examples/dragon_curve.py", line 12, in main
axi.draw(drawing)
File "f:\axidraw\axi\axi\util.py", line 10, in draw
d = Device()
File "f:\axidraw\axi\axi\device.py", line 61, in init
self.configure()
File "f:\axidraw\axi\axi\device.py", line 72, in configure
self.command('SC', 4, pen_up_position)
File "f:\axidraw\axi\axi\device.py", line 89, in command
self.serial.write(line + '\r')
File "F:\Program Files (x86)\Python 3.5\lib\site-packages\serial\serialwin32.py", line 308, in write
data = to_bytes(data)
File "F:\Program Files (x86)\Python 3.5\lib\site-packages\serial\serialutil.py", line 63, in to_bytes
raise TypeError('unicode strings are not supported, please encode to bytes: {!r}'.format(seq))
TypeError: unicode strings are not supported, please encode to bytes: 'SC,4,19800\r'
Process finished with exit code 1
I hope you could help me to resolve it, thanks
I am running python 3.7.4 on windows 10 and I get a load entry point error, which I have no idea what it means.
Installation was successful in a conda environment
Successfully installed axi cairocffi-1.1.0 pyhull-2015.2.1 shapely-1.7.1
My error message is this:
Traceback (most recent call last):
File "C:\tools\Anaconda3\Scripts\axi-script.py", line 11, in <module>
load_entry_point('axi', 'console_scripts', 'axi')()
File "C:\tools\Anaconda3\lib\site-packages\pkg_resources\__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\tools\Anaconda3\lib\site-packages\pkg_resources\__init__.py", line 2852, in load_entry_point
return ep.load()
File "C:\tools\Anaconda3\lib\site-packages\pkg_resources\__init__.py", line 2443, in load
return self.resolve()
File "C:\tools\Anaconda3\lib\site-packages\pkg_resources\__init__.py", line 2449, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "c:\users\ms\downloads\axi\axi\axi\__init__.py", line 1, in <module>
from .device import Device
File "c:\users\ms\downloads\axi\axi\axi\device.py", line 9, in <module>
from .paths import path_length
File "c:\users\ms\downloads\axi\axi\axi\paths.py", line 3, in <module>
from shapely import geometry
File "C:\tools\Anaconda3\lib\site-packages\shapely\geometry\__init__.py", line 4, in <module>
from .base import CAP_STYLE, JOIN_STYLE
File "C:\tools\Anaconda3\lib\site-packages\shapely\geometry\base.py", line 19, in <module>
from shapely.coords import CoordinateSequence
File "C:\tools\Anaconda3\lib\site-packages\shapely\coords.py", line 8, in <module>
from shapely.geos import lgeos
File "C:\tools\Anaconda3\lib\site-packages\shapely\geos.py", line 154, in <module>
_lgeos = CDLL(os.path.join(sys.prefix, 'Library', 'bin', 'geos_c.dll'))
File "C:\tools\Anaconda3\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
I got it installed on windows 10/anaconda 3.7.5. Just trying simple commands like axi goto 30 30
send the arm carrening to its full limts out until the motors reached their limit and started skipping. Also noticed that the pen up/down range is fairly limited.
Wondering if there is some kind of setup or configuration that needs done? I'm using a new SE/A3 that has worked well with the default EMS-software.
ERROR
File "/home/pi/axi-master/axi/device.py", line 61, in init
raise Exception('cannot find axidraw device')
Exception: cannot find axidraw device
CORRECTION
On my side VID_PID should be '04d8:fd92'
Maybe you should compare in lowercase in the find_port() function.
I love this library, and I want to make a plot server to run on Raspbery PI.
Running the latest debian....
When I did
pip install -e .
I got a bunch of errors about libgeos. After searching for solutions
I found that doing this seemed to fix that problem.
sudo apt-get install libgeos-dev
Then when I ran
pip install -e .
I get this error, which is strange since axi is python 3 right?
RuntimeError: cairocffi does not support Python 2.x anymore. Please
use Python 3 or install an older version of cairocffi.
Trace:
pi@raspberrypi:~/axi$ pip install -e .
Obtaining file:///home/pi/axi
Running setup.py (path:/home/pi/axi/setup.py) egg_info for package
from file:///home/pi/axi
Requirement already satisfied (use --upgrade to upgrade): pyserial in
/usr/lib/python2.7/dist-packages (from axi==0.1)
Downloading/unpacking shapely (from axi==0.1)
Downloading Shapely-1.6.4.post2.tar.gz (225kB): 225kB downloaded
Running setup.py (path:/tmp/pip-build-uVKpez/shapely/setup.py)
egg_info for package shapely
Downloading/unpacking pyhull (from axi==0.1)
Downloading pyhull-2015.2.1.tar.gz (318kB): 318kB downloaded
Running setup.py (path:/tmp/pip-build-uVKpez/pyhull/setup.py)
egg_info for package pyhull
warning: no files found matching '*.md'
warning: no files found matching '*.c'
warning: no files found matching 'ez_setup.py'
no previously-included directories found matching '**/tests'
Downloading/unpacking cairocffi (from axi==0.1)
Downloading cairocffi-1.0.2.tar.gz (68kB): 68kB downloaded
Running setup.py (path:/tmp/pip-build-uVKpez/cairocffi/setup.py)
egg_info for package cairocffi
Traceback (most recent call last):
File "", line 17, in
File "/tmp/pip-build-uVKpez/cairocffi/setup.py", line 7, in
'cairocffi does not support Python 2.x anymore. '
RuntimeError: cairocffi does not support Python 2.x anymore.
Please use Python 3 or install an older version of cairocffi.
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 17, in
File "/tmp/pip-build-uVKpez/cairocffi/setup.py", line 7, in
'cairocffi does not support Python 2.x anymore. '
RuntimeError: cairocffi does not support Python 2.x anymore. Please
use Python 3 or install an older version of cairocffi.
Enhancement request to support multiple robots over USB
I came to this axi package to find out how you do your stroke font generation. I've installed axi
and have tested some of the example scripts. One script that isn't working for me is pen_test.py
. It seems to generate an out.png
that shows pen test of a rapidograph 0.1mm. But nothing ever goes to the plotter and the script silently finishes.
(nambu) C:\Users\kanugu\code\axi\examples>python pen_test.py
(0.0, 0.0, 11.69, 2.9487756055115772)
(0.0, 0.0, 2.9487756055115777, 11.69)
the code that should plot it looks comparable to other examples I think
d.dump('out.axi')
d.render(bounds=axi.A3_BOUNDS).write_to_png('out.png')
Is this a package that exists somewhere? I can't seem to find it in the normal places.
Had a few challenges getting everything to install and have passed most hurdles, first Shapely wouldn't install after running your suggested 'pip install -e .' . After manually downloading 'whl' package was able to get past that message. On freshly upgraded pip and setup tools Im having issues getting past a fail to install of pyHull. Manual pip install fails as well for pyhull so I imagine its a issue with them but has anyone had kuck getting past this on windows 10? Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.