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

Run Error #110

Closed
HyperHamster opened this issue Oct 10, 2015 · 14 comments
Closed

Run Error #110

HyperHamster opened this issue Oct 10, 2015 · 14 comments
Labels

Comments

@HyperHamster
Copy link

I get this error when I run the program via sudo -E python script.py.

sys:1: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
Traceback (most recent call last):
  File "script.py", line 44, in <module>
    userhome = ("~" + getlogin())
FileNotFoundError: [Errno 2] No such file or directory

Distro: Antergos 64-bit (Heavily Based on Arch 64-bit)

Installed Dependencies:
python-cairocffi 0.7.2-2 (Community)
python-cairosvg 1.0.16-1 (AUR)
sni-qt-eplus-bzr (AUR)

@Foggalong
Copy link
Contributor

Yay errors \O/

@bilelmoussaoui
Copy link
Owner

which version of Arch are you using?

@bilelmoussaoui
Copy link
Owner

First part of error message should be fixed, can you try again?

@HyperHamster
Copy link
Author

First part is indeed fixed, but the second part's still there although slightly different.

Traceback (most recent call last):
  File "script.py", line 38, in <module>
    userhome = path.expanduser("~" + getlogin())
FileNotFoundError: [Errno 2] No such file or directory

My Arch is version 4.2.2-1 according to Pamac.

@HyperHamster
Copy link
Author

I'm no expert in Python or Linux file structure and I could just be reading it wrong but it looks like you're trying to navigate to the user directory via ~ and then also navigate there again by concatenating the username, which would throw this or a similar error, because it's looking for a folder with the same name as the user folder within the user folder that it's already in.

@bilelmoussaoui
Copy link
Owner

try replacing userhome = path.expanduser("~" + getlogin())
to this
userhome = subprocess.check_output('sh -c "echo $HOME"',universal_newlines=True, shell=True).strip()
and run the script again

@HyperHamster
Copy link
Author

Thank you @bil-elmoussaoui, this new line of code has made the program run correctly. Although I should probably mention that I had to add import subprocess to get the new line to work, otherwise it would just throw an error saying that subprocess was not defined.

$ sudo -E python script.py

Welcome to the tray icons hardcoder fixer!
Your indicator icon size is : 22
Your current icon theme is : Numix-Circle
1 - Apply
2 - Revert
Please choose: 1
Applying now..

Dropbox -- fixed using dropboxstatus-busy
Dropbox -- fixed using dropboxstatus-busy2
Dropbox -- fixed using dropboxstatus-idle
Dropbox -- fixed using dropboxstatus-logo
Dropbox -- fixed using dropboxstatus-x
Skype -- fixed using skype-status-away
Skype -- fixed using skype-status-away-notification
Skype -- fixed using skype-status-connected
Skype -- fixed using skype-status-connected-notification
Skype -- fixed using skype-status-connecting-0
Skype -- fixed using skype-status-connecting-1
Skype -- fixed using skype-status-connecting-2
Skype -- fixed using skype-status-connecting-3
Skype -- fixed using skype-status-disturb
Skype -- fixed using skype-status-disturb-notification
Skype -- fixed using skype-status-invisible
Skype -- fixed using skype-status-invisible-notification
Skype -- fixed using skype-status-offline
Skype -- fixed using skype-status-offline-notification

Done , Thank you for using the Hardcode-Tray fixer!

@HyperHamster
Copy link
Author

It appears that even though the program has ran and says that it has fixed the skype and dropbox tray icons they appear to not actually be fixed. I think if we were to investigate that it'd have to be in another issue, because now that the program is running this issue is technically fixed.

@Foggalong
Copy link
Contributor

If the line needs to be added though this issue isn't fixed until that line is added to the code 📦

@HyperHamster HyperHamster reopened this Oct 12, 2015
@HyperHamster
Copy link
Author

@Foggalong Oh, sorry. I'm still unfamilar with how github works exactly, thanks for telling me.

@Foggalong
Copy link
Contributor

No problem!

bilelmoussaoui added a commit that referenced this issue Oct 13, 2015
@bilelmoussaoui
Copy link
Owner

Fixed!

@andia89
Copy link
Collaborator

andia89 commented Oct 18, 2015

@bil-elmoussaoui Have you tried if it works? (I think you had the problem too)

@bilelmoussaoui
Copy link
Owner

@wa4557 if you're talking about #104, yes it works :p just need a confirmation from @Foggalong too

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

4 participants