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

Error at Run #104

Closed
Foggalong opened this issue Oct 1, 2015 · 43 comments
Closed

Error at Run #104

Foggalong opened this issue Oct 1, 2015 · 43 comments
Labels

Comments

@Foggalong
Copy link
Contributor

** (script.py:9814): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-3yG1qfbeRF: Connection refused
Traceback (most recent call last):
  File "./script.py", line 21, in <module>
    from cairosvg import svg2png
  File "/usr/lib/python3/dist-packages/cairosvg/__init__.py", line 27, in <module>
    from . import surface
  File "/usr/lib/python3/dist-packages/cairosvg/surface/__init__.py", line 47, in <module>
    "optimizeSpeed": cairo.ANTIALIAS_FAST,
AttributeError: 'module' object has no attribute 'ANTIALIAS_FAST'

Then it just exits.

@bilelmoussaoui
Copy link
Owner

Can you paste the output of dpkg -l | grep python3-cairosvg? This seems to be an issue with Cairosvg, maybe reinstalling it?

@Foggalong
Copy link
Contributor Author

ii  python3-cairosvg 1.0.16-1 all SVG to PDF/PS/PNG converter based on Cairo (Python3 library)

@bilelmoussaoui
Copy link
Owner

I'm using 1.0.4-1 and everything works fine here;@wa4557 do you have any idea why this is happening?

@andia89
Copy link
Collaborator

andia89 commented Oct 1, 2015

Also using 1.0.4-1 and no problems, seems to be a bug that is introduced with the newer version :(

@bilelmoussaoui
Copy link
Owner

Which distro you're using @Foggalong ? if you can downgrade to the same version as @wa4557 and i are using that would fix the issue for you i hope. Otherwise i don't think that we can do something about it

@Foggalong
Copy link
Contributor Author

Just updated to 15.10 last night

@bilelmoussaoui
Copy link
Owner

I tried to google your error message and i had really no answers :/ maybe downgrading or upgrading to a newer version of python3-cariosvg will solve your issue.
First remove python3-cairosvg sudo apt-get remove python3-cairosvg
Install Pip3 sudo apt-get install python3-pip
Install Cairosvg using pip pip install cairosvg(you might need root permissions)

@Foggalong
Copy link
Contributor Author

Installing via pip brings up the missing dependency error

You need to install python3-cairosvg to run this script.        
Please install it and try again. Exiting.

That's always been the case for me: the error comes up if cairosvg is installed via PIP but not if the python3-cairosvg package is installed

@bilelmoussaoui
Copy link
Owner

Try using pip3 install cairosvg that should install the right version for python3

@Foggalong
Copy link
Contributor Author

Yeah, that's the command I used. That error happens regardless of the PIP version

@Foggalong
Copy link
Contributor Author

Any thoughts on this? The massive Skype and ownCloud icons are getting annoying :(

@andia89
Copy link
Collaborator

andia89 commented Oct 5, 2015

What happens if you open an ipython console (or python console) and try from cairosvg import svg2png?

@Foggalong
Copy link
Contributor Author

josh@brain:~$ sudo pip3 install cairosvg
[sudo] password for josh: 
Requirement already satisfied (use --upgrade to upgrade): cairosvg in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied (use --upgrade to upgrade): cairocffi in /usr/local/lib/python3.5/dist-packages (from cairosvg)
Requirement already satisfied (use --upgrade to upgrade): cffi>=1.1.0 in /usr/lib/python3/dist-packages (from cairocffi->cairosvg)
Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/lib/python3/dist-packages (from cffi>=1.1.0->cairocffi->cairosvg)
Cleaning up...
>>> from cairosvg import svg2png
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'cairosvg'

@bilelmoussaoui
Copy link
Owner

try reinstalling it using apt package and then retry what @wa4557 said ?

@Foggalong
Copy link
Contributor Author

>>> import cairosvg
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/cairosvg/__init__.py", line 27, in <module>
    from . import surface
  File "/usr/lib/python3/dist-packages/cairosvg/surface/__init__.py", line 47, in <module>
    "optimizeSpeed": cairo.ANTIALIAS_FAST,
AttributeError: 'module' object has no attribute 'ANTIALIAS_FAST'
>>> from cairosvg import svg2png
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/cairosvg/__init__.py", line 27, in <module>
    from . import surface
  File "/usr/lib/python3/dist-packages/cairosvg/surface/__init__.py", line 43, in <module>
    from . import units
ImportError: cannot import name 'units'

@bilelmoussaoui
Copy link
Owner

Sorry i can't help with that :/
The only way to fix those issues are

  • Build an older version of cairosvg
  • Contact the maintainer of cairosvg package and wait until this get fixed

@Foggalong
Copy link
Contributor Author

How much of the script depends on this feature? This is just the beta for 15.10 which will be released in 16 days, so what most people will be using pretty soon :(

@bilelmoussaoui
Copy link
Owner

Well, this is not a script issue :/ We use cairosvg to convert svg icons to png ones.. I guess that i will add the possiblity to disable cairosvg and use inkscape instead, what do you think?

@Foggalong
Copy link
Contributor Author

That's what I meant - how much of the script depends on cairosvg. I don't really know, but that sounds like a pretty important feature. Maybe now is the time to set up that PPA you were talking about?

@Foggalong
Copy link
Contributor Author

Building from source is also giving the "not installed" error (like the PIP package) which I'm guessing is a bug with the script.

@bilelmoussaoui
Copy link
Owner

Well, creating a PPA will not fix python3-cairosvg issue as it's has nothing to do with Hardcode-Tray..And a lot of icons are png specially Qt applications they're all using png icons.
The only thing i can do is wait until Ubuntu 15.10 is released and will see if this get fixed. If not i will add a check in the script to detect if the user rather uses cairosvg or have inkscape installed. And use one of them; this will need some of rewriting and might take some time;
What about asking a question with the python error in Stackexchange or somewhere else maybe someone will be able to help you fix this!

@Foggalong
Copy link
Contributor Author

Found the solution :) There's a new dependency in the latest version of python3-cairosvg which isn't installed automatically.

@bilelmoussaoui
Copy link
Owner

Happy to hear that ! :D feel free to add that to the readme file

Le 6 oct. 2015 à 01:02, Joshua H. Fogg notifications@github.com a écrit :

Found the solution :) There's a new dependency in the latest version of python3-cairosvg which isn't installed automatically.


Reply to this email directly or view it on GitHub.

@Foggalong
Copy link
Contributor Author

Yeah, just working on the check within the script now

@bilelmoussaoui
Copy link
Owner

This does not seem to be fixed.. I upgraded to Ubuntu 15.10 Beta yesterday and installed the new dependencies and still have the same error message as yours!

@bilelmoussaoui bilelmoussaoui reopened this Oct 9, 2015
@Foggalong
Copy link
Contributor Author

I don't get the error anymore, but it doesn't seem to be fixing the owncloud and skype icons either. It's also done something weird with the hexchat icon which has made it really small

@bilelmoussaoui
Copy link
Owner

Skype and owncloud icons are not fixed here too! maybe a sni-qt issue? And for the Hexchat icons, did those icons were looking fine before? i mean in an older version of ubuntu?

@Foggalong
Copy link
Contributor Author

Yeah, before 15.10 they were fine then I upgraded and they were fine, then I ran the tray script and they went tiny.

@bilelmoussaoui
Copy link
Owner

Can you open a new issue for that with a screenshot? if you can get the icon size too the icons for hexchat are stored in $HOME/.config/hexchat/icons or something like that.. :)

@andia89
Copy link
Collaborator

andia89 commented Oct 9, 2015

Apart from switching to inkscape (which I think is a bad idea) I guess there's not much we can do about this but wait for an upstream fix...

@bilelmoussaoui
Copy link
Owner

Yes, i kept this open until this issue get fixed

Le 9 oct. 2015 à 17:11, Andreas Angerer notifications@github.com a écrit :

Apart from switching to inkscape (which I think is a bad idea) I guess there's not much we can do about this but wait for an upstream fix...


Reply to this email directly or view it on GitHub.

@Foggalong
Copy link
Contributor Author

If you're having the same error but have both packages installed then there's probably a 3rd dependency that I have (probs for something else) but you don't

@Foggalong
Copy link
Contributor Author

@bil-elmoussaoui do you get the exact same error I did or slightly different?

@bilelmoussaoui
Copy link
Owner

Don't remember, i will need to boot in Fedora 23 beta to test that again

@Foggalong
Copy link
Contributor Author

👍

@bilelmoussaoui
Copy link
Owner

And if you have any free time to check this #97, i would be very thankful!

@bilelmoussaoui
Copy link
Owner

Inkscape support should be working in the Beta branch! @wa4557 I don't know how to check if inkscape is installed using bash so i can do a double check if both python3-cairosvg and inkscape are not installed and show a error message to the user, can you do that on the Beta branch? 👍

@andia89
Copy link
Collaborator

andia89 commented Oct 18, 2015

I should check if inkscape is installed? I think I can do that, let me think about this...

@bilelmoussaoui
Copy link
Owner

Yes, somewhere here

try:
    from cairosvg import svg2png
    use_inkscape = False
except ImportError:
    use_inkscape = True

@andia89
Copy link
Collaborator

andia89 commented Oct 18, 2015

Cool, already have an idea :)

@andia89
Copy link
Collaborator

andia89 commented Oct 18, 2015

Done

@bilelmoussaoui
Copy link
Owner

Thanks! 💃

@andia89
Copy link
Collaborator

andia89 commented Oct 18, 2015

You tried if it works? (I think you had the exact problem)

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

No branches or pull requests

3 participants