moses-palmer / virtual-touchpad

Turns your mobile or tablet into a touchpad for your computer
Other
20 stars 0 forks source link

Error on install #1

Closed abelramos closed 8 years ago

abelramos commented 10 years ago

I am getting an error after sudo ./setup.py install

running install running bdist_egg running minify_help Failed to minify SVG ./lib/virtualtouchpad/html/img/fullscreen-on.svg: python: can't open file './lib/build/../../scour/scour/scour.py': [Errno 2] No such file or directory

I think the download zip is not updated, can you please update it? I am willing to see this module in action ;)

moses-palmer commented 10 years ago

Hi abelramos,

The download zip file is generated by github, and it appears that they do not include submodules when they package it.

You can either install with pip: sudo pip install virtual-touchpad

or clone the virtual-touchpad git repository: git clone https://github.com/moses-palmer/virtual-touchpad cd virtual-touchpad git submodule update --init --recursive sudo python setup.py install

I hope this resolves the issue!

Best regards, Moses Palmér Den 15 maj 2014 04:18 skrev "abelramos" notifications@github.com:

I am getting an error after sudo ./setup.py install

running install running bdist_egg running minify_help Failed to minify SVG ./lib/virtualtouchpad/html/img/fullscreen-on.svg: python: can't open file './lib/build/../../scour/scour/scour.py': [Errno 2] No such file or directory

I think the download zip is not updated, can you please update it? I am willing to see this module in action ;)

— Reply to this email directly or view it on GitHubhttps://github.com/moses-palmer/virtual-touchpad/issues/1 .

abelramos commented 10 years ago

Ok, I followed your instructions, but when i run 'python -m virtualtouchpad' I get this:

Xlib.protocol.request.QueryExtension Exception AttributeError: "'NoneType' object has no attribute 'destroy'" in <bound method SystemTrayIcon.del of <virtualtouchpad._platform.systray._linux.xsystray.SystemTrayIcon object at 0x98e034c>> ignored [Errno 0] Error: 'virtualtouchpad/_platform/systray/_linux/../../../html/img/icon196x196.png'

any ideas??

moses-palmer commented 10 years ago

Did you get a warning when running setup.py about ImageMagick missing?

I think the icons were not generated when you installed.

Does Virtual Touchpad stop, or does it keep running in the terminal even after the error message?

abelramos commented 10 years ago

No, I don't get any warnings when running setup.py The icons were generated, I looked for them in virtualtouchpad/html/img/ inside virtual_touchpad-0.11-py2.7.egg and they are there. And Virtual Touchpad stop, yes, it doesn't keep running in the terminal.

Thanks for your replies, I feel I am giving you too much trouble

moses-palmer commented 10 years ago

No worries, it is supposed to just work :-)

Could you please paste the entire printout of the application so that I can have a closer look?

neojski commented 10 years ago

I'm also having problems installing it:

sudo python2 setup.py build
running build
running minify_help
Failed to minify SVG lib/virtualtouchpad/html/img/fullscreen-on.svg: Traceback (most recent call last):
  File "lib/build/../../scour/scour/scour.py", line 3274, in <module>
    run()
  File "lib/build/../../scour/scour/scour.py", line 3268, in run
    options, (input, output) = parse_args()
  File "lib/build/../../scour/scour/scour.py", line 3186, in parse_args
    infile = maybe_gziped_file(options.infilename)
  File "lib/build/../../scour/scour/scour.py", line 3169, in maybe_gziped_file
    return file(filename, mode)
NameError: name 'file' is not defined

And basically I get the same problem when I try with python3.

When I tried pip:

pip2 install virtual-touchpad
Downloading/unpacking virtual-touchpad
  Downloading virtual-touchpad-0.11.tar.gz (89kB): 89kB downloaded
  Running setup.py (path:/tmp/pip_build_neo/virtual-touchpad/setup.py) egg_info for package virtual-touchpad
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_neo/virtual-touchpad/setup.py", line 157, in <module>
        @build.utility
    AttributeError: class build has no attribute 'utility'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_neo/virtual-touchpad/setup.py", line 157, in <module>

    @build.utility

AttributeError: class build has no attribute 'utility'

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_neo/virtual-touchpad
Storing debug log for failure in /home/neo/.pip/pip.log

And the same with pip3.

moses-palmer commented 10 years ago

Those errors with scour look really strange... "file" not defined? What happens if you try to manually run scour? What platform is this?

neojski commented 10 years ago

Arch linux.

python2 scour/scour/scour.py -h

Just works.

python2 scour/scour/scour.py -i lib/virtualtouchpad/html/img/fullscreen-on.svg -o xxx.svg

also works.

Maybe your program assumes python2 as default?

neojski commented 10 years ago

Looks like it was the case. After I symlinked python to python2 it worked. However, this is inacceptable change since python3 is default in arch. Will you extract it as separate bug?

neojski commented 10 years ago

But it still fails:

Running: python2 -m virtualtouchpad

/usr/lib/python2.7/site-packages/virtual_touchpad-0.11-py2.7.egg/virtualtouchpad/_platform/__init__.py:20: UserWarning: Module virtualtouchpad was already imported from /usr/lib/python2.7/site-packages/virtual_touchpad-0.11-py2.7.egg/virtualtouchpad/__init__.pyc, but /tmp/virtual-touchpad is being added to sys.path
/usr/bin/python2: ('Failed to locate platform driver for package %s', 'virtualtouchpad._platform.event'); 'virtualtouchpad' is a package and cannot be directly executed

I'm not really a python guy so it's difficult for me to help

moses-palmer commented 10 years ago

OK, that makes sense; I suppose scour does not support Python 3.

Could you please try to apply the patch below? It uses the Python interpreter used to launch the setup process to launch scour instead of "python".

Before you run the setup script again, please uninstall the current version from /usr/lib/python2.7/site-packages/virtual_touchpad-0.11-py2.7.egg to allow us to focus on one issue at a time.

diff --git a/lib/build/xmltransform.py b/lib/build/xmltransform.py
index 52357ad..4ba5973 100644
--- a/lib/build/xmltransform.py
+++ b/lib/build/xmltransform.py
@@ -1,4 +1,5 @@
 import os
+import sys

 from xml.dom import Node
 from xml.dom.minidom import CDATASection
@@ -101,7 +102,7 @@ def _inline_svg(e, source_dir, dom, files):

     # Load the minified SVG
     src = os.path.join(source_dir, e.getAttribute('src'));
-    p = subprocess.Popen(['python',
+    p = subprocess.Popen([sys.executable,
         os.path.join(os.path.dirname(__file__),
             os.path.pardir, os.path.pardir, 'scour', 'scour', 'scour.py'),
         '-i', src,
neojski commented 10 years ago

After that patch it built but did not install:

sudo python2 setup.py install
running install
running bdist_egg
running minify_help
running generate_webapp_icons
running minify_index
running generate_translations
running generate_windows_icons
running egg_info
writing requirements to virtual_touchpad.egg-info/requires.txt
writing virtual_touchpad.egg-info/PKG-INFO
writing top-level names to virtual_touchpad.egg-info/top_level.txt
writing dependency_links to virtual_touchpad.egg-info/dependency_links.txt
reading manifest file 'virtual_touchpad.egg-info/SOURCES.txt'
writing manifest file 'virtual_touchpad.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/virtualtouchpad
creating build/bdist.linux-x86_64/egg/virtualtouchpad/html
creating build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
copying build/lib/virtualtouchpad/html/js/checks.js -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
copying build/lib/virtualtouchpad/html/js/configuration.js -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
copying build/lib/virtualtouchpad/html/js/controller.js -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
copying build/lib/virtualtouchpad/html/js/features.js -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
copying build/lib/virtualtouchpad/html/js/init.js -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
copying build/lib/virtualtouchpad/html/js/main.js -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
copying build/lib/virtualtouchpad/html/js/message-box.js -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
copying build/lib/virtualtouchpad/html/js/settings.js -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
copying build/lib/virtualtouchpad/html/js/toolbar-bottom.js -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
copying build/lib/virtualtouchpad/html/js/toolbar.js -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
copying build/lib/virtualtouchpad/html/js/trackbar.js -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
copying build/lib/virtualtouchpad/html/js/translation.js -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
copying build/lib/virtualtouchpad/html/js/util.js -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
copying build/lib/virtualtouchpad/html/js/view.js -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/js
creating build/bdist.linux-x86_64/egg/virtualtouchpad/html/img
copying build/lib/virtualtouchpad/html/img/fullscreen-off.svg -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/img
copying build/lib/virtualtouchpad/html/img/fullscreen-on.svg -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/img
copying build/lib/virtualtouchpad/html/img/help.svg -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/img
copying build/lib/virtualtouchpad/html/img/settings.svg -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/img
copying build/lib/virtualtouchpad/html/img/icon196x196.png -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/img
copying build/lib/virtualtouchpad/html/img/icon144x144.png -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/img
copying build/lib/virtualtouchpad/html/img/icon114x114.png -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/img
copying build/lib/virtualtouchpad/html/img/icon96x96.png -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/img
copying build/lib/virtualtouchpad/html/img/icon72x72.png -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/img
copying build/lib/virtualtouchpad/html/img/icon57x57.png -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/img
copying build/lib/virtualtouchpad/html/img/icon48x48.png -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/img
creating build/bdist.linux-x86_64/egg/virtualtouchpad/html/css
copying build/lib/virtualtouchpad/html/css/help.css -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/css
copying build/lib/virtualtouchpad/html/css/message-box.css -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/css
copying build/lib/virtualtouchpad/html/css/settings.css -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/css
copying build/lib/virtualtouchpad/html/css/style.css -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/css
copying build/lib/virtualtouchpad/html/css/toolbar-bottom.css -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/css
copying build/lib/virtualtouchpad/html/css/toolbar.css -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/css
copying build/lib/virtualtouchpad/html/css/touchpad.css -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/css
copying build/lib/virtualtouchpad/html/css/trackbar.css -> build/bdist.linux-x86_64/egg/virtualtouchpad/html/css
copying build/lib/virtualtouchpad/html/help.xhtml -> build/bdist.linux-x86_64/egg/virtualtouchpad/html
copying build/lib/virtualtouchpad/html/index.xhtml -> build/bdist.linux-x86_64/egg/virtualtouchpad/html
copying build/lib/virtualtouchpad/html/virtual-touchpad.appcache -> build/bdist.linux-x86_64/egg/virtualtouchpad/html
copying build/lib/virtualtouchpad/html/help.min.xhtml -> build/bdist.linux-x86_64/egg/virtualtouchpad/html
copying build/lib/virtualtouchpad/html/index.min.xhtml -> build/bdist.linux-x86_64/egg/virtualtouchpad/html
creating build/bdist.linux-x86_64/egg/virtualtouchpad/_platform
creating build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/event
copying build/lib/virtualtouchpad/_platform/event/__init__.py -> build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/event
copying build/lib/virtualtouchpad/_platform/event/_linux.py -> build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/event
copying build/lib/virtualtouchpad/_platform/event/_win.py -> build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/event
creating build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/systray
creating build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/systray/_linux
copying build/lib/virtualtouchpad/_platform/systray/_linux/__init__.py -> build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/systray/_linux
copying build/lib/virtualtouchpad/_platform/systray/_linux/xsystray.py -> build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/systray/_linux
creating build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/systray/_win
copying build/lib/virtualtouchpad/_platform/systray/_win/__init__.py -> build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/systray/_win
copying build/lib/virtualtouchpad/_platform/systray/_win/win32systray.py -> build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/systray/_win
copying build/lib/virtualtouchpad/_platform/systray/__init__.py -> build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/systray
copying build/lib/virtualtouchpad/_platform/__init__.py -> build/bdist.linux-x86_64/egg/virtualtouchpad/_platform
copying build/lib/virtualtouchpad/_platform/_linux.py -> build/bdist.linux-x86_64/egg/virtualtouchpad/_platform
copying build/lib/virtualtouchpad/_platform/_win.py -> build/bdist.linux-x86_64/egg/virtualtouchpad/_platform
creating build/bdist.linux-x86_64/egg/virtualtouchpad/dispatchers
copying build/lib/virtualtouchpad/dispatchers/__init__.py -> build/bdist.linux-x86_64/egg/virtualtouchpad/dispatchers
copying build/lib/virtualtouchpad/dispatchers/keyboard.py -> build/bdist.linux-x86_64/egg/virtualtouchpad/dispatchers
copying build/lib/virtualtouchpad/dispatchers/mouse.py -> build/bdist.linux-x86_64/egg/virtualtouchpad/dispatchers
copying build/lib/virtualtouchpad/__init__.py -> build/bdist.linux-x86_64/egg/virtualtouchpad
copying build/lib/virtualtouchpad/__main__.py -> build/bdist.linux-x86_64/egg/virtualtouchpad
copying build/lib/virtualtouchpad/_info.py -> build/bdist.linux-x86_64/egg/virtualtouchpad
copying build/lib/virtualtouchpad/announce.py -> build/bdist.linux-x86_64/egg/virtualtouchpad
copying build/lib/virtualtouchpad/dispatch.py -> build/bdist.linux-x86_64/egg/virtualtouchpad
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/event/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/event/_linux.py to _linux.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/event/_win.py to _win.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/systray/_linux/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/systray/_linux/xsystray.py to xsystray.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/systray/_win/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/systray/_win/win32systray.py to win32systray.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/systray/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/_linux.py to _linux.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/_platform/_win.py to _win.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/dispatchers/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/dispatchers/keyboard.py to keyboard.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/dispatchers/mouse.py to mouse.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/__main__.py to __main__.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/_info.py to _info.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/announce.py to announce.pyc
byte-compiling build/bdist.linux-x86_64/egg/virtualtouchpad/dispatch.py to dispatch.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying virtual_touchpad.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying virtual_touchpad.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying virtual_touchpad.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying virtual_touchpad.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying virtual_touchpad.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying virtual_touchpad.egg-info/zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
creating 'dist/virtual_touchpad-0.11-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing virtual_touchpad-0.11-py2.7.egg
Copying virtual_touchpad-0.11-py2.7.egg to /usr/lib/python2.7/site-packages
Adding virtual-touchpad 0.11 to easy-install.pth file

Installed /usr/lib/python2.7/site-packages/virtual_touchpad-0.11-py2.7.egg
Processing dependencies for virtual-touchpad==0.11
Searching for python-xlib
Reading https://pypi.python.org/simple/python-xlib/
Reading http://python-xlib.sourceforge.net/
Reading http://sourceforge.net/project/showfiles.php?group_id=10350
No local packages or download links found for python-xlib
error: Could not find suitable distribution for Requirement.parse('python-xlib')

It looks like it complains about externality:

------------------------------------------------------------
/usr/bin/pip2 run on Wed Sep 10 06:57:55 2014
Downloading/unpacking python-xlib
  Getting page https://pypi.python.org/simple/python-xlib/
  URLs to search for versions for python-xlib:
  * https://pypi.python.org/simple/python-xlib/
  Analyzing links from page https://pypi.python.org/simple/python-xlib/
    Skipping link http://python-xlib.sourceforge.net/ (from https://pypi.python.org/simple/python-xlib/); not a file
    Skipping link http://sourceforge.net/project/showfiles.php?group_id=10350 (from https://pypi.python.org/simple/python-xlib/); unknown archive format: .php
  Not searching http://python-xlib.sourceforge.net/ (from https://pypi.python.org/simple/python-xlib/) for urls, it is an untrusted link and cannot produce safe or verifiable files.
  Not searching http://sourceforge.net/project/showfiles.php?group_id=10350 (from https://pypi.python.org/simple/python-xlib/) for urls, it is an untrusted link and cannot produce safe or verifiable files.
  Could not find any downloads that satisfy the requirement python-xlib
  Some insecure and unverifiable files were ignored (use --allow-unverified python-xlib to allow).
Cleaning up...
  Removing temporary dir /tmp/pip_build_root...
No distributions at all found for python-xlib
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip-1.5-py2.7.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip-1.5-py2.7.egg/pip/commands/install.py", line 270, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/site-packages/pip-1.5-py2.7.egg/pip/req.py", line 1157, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/usr/lib/python2.7/site-packages/pip-1.5-py2.7.egg/pip/index.py", line 285, in find_requirement
    raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for python-xlib
neojski commented 10 years ago

After installing python2-xlib using pacman I get (when I run install):

...
Installed /usr/lib/python2.7/site-packages/virtual_touchpad-0.11-py2.7.egg
Processing dependencies for virtual-touchpad==0.11
Searching for PIL
Reading https://pypi.python.org/simple/PIL/
Reading http://effbot.org/downloads/#Imaging
Reading http://effbot.org/zone/pil-changes-115.htm
Reading http://www.pythonware.com/products/pil
Best match: PIL 1.1.7
Downloading http://effbot.org/media/downloads/PIL-1.1.7.tar.gz
Processing PIL-1.1.7.tar.gz
Writing /tmp/easy_install-HfouUw/PIL-1.1.7/setup.cfg
Running PIL-1.1.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-HfouUw/PIL-1.1.7/egg-dist-tmp-EoSwPk
WARNING: '' not a valid package name; please use only.-separated package names in setup.py
_imaging.c:3017:5: warning: initialization from incompatible pointer type
     (inquiry) image_length, /*sq_length*/
     ^
_imaging.c:3017:5: warning: (near initialization for ‘image_as_sequence.sq_length’)
_imaging.c:3077:5: warning: initialization from incompatible pointer type
     (inquiry) NULL, /*mp_length*/
     ^
_imaging.c:3077:5: warning: (near initialization for ‘pixel_access_as_mapping.mp_length’)
libImaging/Quant.c: In function ‘rehash_collide’:
libImaging/Quant.c:154:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    *valp=(void *)((*(int *)valp)+(*(int *)&newval));
          ^
_imagingft.c:73:31: fatal error: freetype/fterrors.h: No such file or directory
 #include <freetype/fterrors.h>
                               ^
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
moses-palmer commented 10 years ago

This is a problem with the way compiled Python modules are packaged on pypi and installer using setuptools: you need to have the dependencies, including headers, for any C libraries that they use installed, and it is not possible to list these dependencies in the metadata.

virtualtouchpad uses PIL---Python Imaging Library---to load the notification icon, and PIL is a compiled package and is thus compiled when it has been downloaded from the Python Package Index. One of its dependencies appears to libfreetype.

The possible solutions are to either install PIL using pacman---I thinks this package is what you want for Arch: https://www.archlinux.org/packages/community/x86_64/python2-pillow/---or download the headers for libfreetype. I cannot help you with the latter, as I have no experience with Arch.

blabberer commented 8 years ago

i get an access denied 403 error when trying to open the url in android browser any ideas how to move ahead windows 7 sp1 and samsung mobile
pip install virtual-touchpad didn't install it properly it wanted FCNTL module which isnt available for windows it seems

so git cloned , downloaded the dependencies (bottle ..... pywin32 for python version 2.7) and ran python setup.py install

this creates an egg file in c:\Python27\Lib\Site-packages
(because it is not a folder but an archive and error is thrown when doing LoadImage (icon ) it cant find the icon file
though it doesnt hinder the starting of the server i cannot connect to it

any pointers regarding what am i missing would be great

python -m virtualtouchpad hiC:\Python27\lib\site-packages\virtual_touchpad-0.12.3-py2.7.egg\virtualtouchpad\systray\win32\..\..\..\..\..\build\icos\icon-all.ico <------- my dbg msg Exception in thread Thread-1: Traceback (most recent call last): File "C:\Python27\lib\threading.py", line 801, in bootstrap_inner self.run() File "C:\Python27\lib\threading.py", line 754, in run self.__target(_self.args, *_self.__kwargs) File "build\bdist.win32\egg\virtualtouchpad\systray\win32\win32systray.py", line 75, in _mainloop self._add_icon() File "build\bdist.win32\egg\virtualtouchpad\systray\win32\win32systray.py", line 47, in _add_icon self.window, File "build\bdist.win32\egg\virtualtouchpad\systray\win32\win32systray.py", line 146, in window window_class.hIcon = self.icon File "build\bdist.win32\egg\virtualtouchpad\systray\win32\win32systray.py", line 133, in icon win32con.LR_DEFAULTSIZE | win32con.LR_LOADFROMFILE) error: (2, 'LoadImage', 'The system cannot find the file specified.')

Starting server http://192.168.43.2:16080/... KeyboardInterrupt

moses-palmer commented 8 years ago

I have tested to install using both pip and git clone and experience the same issues.

A temporary workaround for you is to open http://192.168.43.2:16080/index.xhtml instead, or to run the application from the repo directory by issuing the following commands in a command window:

set PYTHONPATH=lib
python -m virtualtouchpad

When running virtual-touchpad from the repo directory, the advertised URL also works.

I will need to update the packaging---the wheel available on PyPi supports only Linux, despite being marked as cross-platform---and support proper Windows packages.

blabberer commented 8 years ago

Thanks moses for the reply yes i searched the directory yesterday for index.html found this xhtml (6 of them including some min.xhtml whose src seems to be for non touch devices i was able to open two pages index and index.min.xhtml one of them opens a page with nothing visible on the top and a black box in the bottom (index.xhtml) other opens a page which has only a question mark in the right top corner and other features similar to the earlier on (index.min.xhtml)

if i open both the url in the same pc that runs the server i get a your browser does not support touch events page
any ideas ? should i try installing opera in the mobile ?

lenovas shareit seems to flip the powerpoint slides from a mobile so in theory i should be able to get this touchpad working regards

moses-palmer commented 8 years ago

The *.min.xhtml files are just minified and inlined versions of the non-minified files.

Have you tested whether the track pad works? Upon successful launch, you will see a white bar at the top of the window and most of the screen covered by the actual track pad. Dragging your finger across the dark area should move the pointer on screen. If you flip your mobile to landscape, a keyboard will be displayed.

What Android web browser do you use? I have tested it only on Chrome. It is supposed to detect missing featured though, so an error message should be displayed if the browser is not supported.

2016-01-25 5:48 GMT+01:00 blabberer notifications@github.com:

Thanks moses for the reply yes i searched the directory yesterday for index.html found this xhtml (6 of them including some min.xhtml whose src seems to be for non touch devices i was able to open two pages index and index.min.xhtml one of them opens a page with nothing visible on the top and a black box in the bottom (index.xhtml) other opens a page which has only a question mark in the right top corner and other features similar to the earlier on (index.min.xhtml)

if i open both the url in the same pc that runs the server i get a your browser does not support touch events page

any ideas ? should i try installing opera in the mobile ?

lenovas shareit seems to flip the powerpoint slides from a mobile so in theory i should be able to get this touchpad working regards

— Reply to this email directly or view it on GitHub https://github.com/moses-palmer/virtual-touchpad/issues/1#issuecomment-174398194 .

blabberer commented 8 years ago

1) yes i see the white bar and black trackpad portion on the android browser 2) the white bar appears to have a few sensitive points (squares that get highlighted like buttons) 3) those button like highlights appear to do nothing 4)the trackpad does not move the mouse pointer 5) pinch zoom or drag nothing appears to operate

Created by using HTTPNetworkSniffer

Host Name 192.168.43.2:16080 Method GET Path /index.xhtml User Agent Mozilla/5.0 (Linux; U; Android 2.3.6; en-gb; GT-S6102 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 Response Code 200 Response String OK Content Type application/xhtml+xml Referer
Content Encoding
Transfer Encoding Server Content Length 6095 Connection Cache Control Location Server Time 1/25/2016 12:45:10 PM Expiration Time Last Modified Time 1/23/2016 12:14:06 PM Cookie Client Address 192.168.43.1:51328 Server Address 192.168.43.2:16080 Request Time 00:00:11.876 Response Time 384 ms URL http://192.168.43.2:16080/index.xhtml

edit i get 23 error 304 per request and 1 ok 200 response code

a sample packet of ERROR 304

Host Name Method Path User Agent Response Code Response String Content Type Referer Content Encoding Transfer Encoding Server Content Length Connection Cache Control Location Server Time Expiration Time Last Modified Time Cookie Client Address Server Address Request Time Response Time URL 192.168.43.2:16080 GET /js/lib/configuration.js Mozilla/5.0 (Linux; U; Android 2.3.6; en-gb; GT-S6102 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 304 Not Modified http://192.168.43.2:16080/index.xhtml 0 1/25/2016 12:57:29 PM 192.168.43.1:39794 192.168.43.2:16080 00:00:01.050 3 ms http://192.168.43.2:16080/js/lib/configuration.js

moses-palmer commented 8 years ago

This appears to be three simultaneous issues:

  1. Installing from PyPi does not work on Windows.
  2. When installing using setup.py on Windows, the systray icon fails to load.
  3. The application does not appear to work on your browser.

I just released 0.12.4 which addresses the two first issues: the dependencies now correctly depend on the current platform, and the icon file can be loaded even when running the wheel.

Regarding issue 3: Do you use the built-in Android Web Browser? You appear to have a rather old version of Android running, and the built in browser may not be supported. Have you tried using Chrome or another browser from the Play Store?

blabberer commented 8 years ago

1) yes using the inbuilt browser on an old samsung duos 2) no i haven't installed chrome yet. 3) i had opera earlier on this dump but uninstalled it to install candy crush or some other silly stuff like that on popular demand :) 4) will check if i can install chrome on this or opera again and revert back 5) thanks for the release will check them out too

blabberer commented 8 years ago

installed opera but it can't parse the xhtml (missing end tag on line 5 reparse as html ? error) i cant get chrome to install on this phone in the meantime tried this with another phone (redmi2) and the trackpad and keyboard works nicely thank you for the updates