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
acyls.lib missing #19
Comments
How do you install program? Can you confirm that Can you place this script into #!/usr/bin/env python3
import os
import sys
print(os.path.abspath(__file__))
dir_ = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")
print(dir_)
sys.path.append(dir_)
import scripts
print(scripts)
try:
import scripts.lib as test_import
print(test_import)
except ImportError as e:
print(e) |
Well - i've tried 3 versions : Opendesktop, github dev and master
then i simply
i also installed and started tox :
HTH ! |
The output of your script :
EDIT
|
In file sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
import scripts with import imp
scripts = imp.load_source('scripts', os.path.join(os.path.dirname(os.path.abspath(__file__)), "__init__.py")) and try to launch program? |
Same result as before :
|
Could it be a problem caused by python3-lxml ? It's the only package that isn't from Debian official repos (my OS is MX 17, Debian stable based, no systemd). |
Seems like you have some system installed python module 'scripts', while my program used to load its local 'scripts' directory as module. Don't you mind also check this script output? #!/usr/bin/env python3
import os
import sys
import imp
scripts = imp.load_source('scripts', os.path.join(os.path.dirname(os.path.abspath(__file__)), "__init__.py"))
print(scripts)
sys.modules['acyls'] = scripts
try:
import acyls.lib as test_import
print(test_import)
except ImportError as e:
print(e) |
Hop !
|
OK, seems module loaded correctly. Strange why launch script give the same error. Here is full fixed 'run.py', try it. #!/usr/bin/env python3
# -*- Mode: Python; indent-tabs-mode: t; python-indent: 4; tab-width: 4 -*-
import os
import sys
import imp
# Check requirements
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
if sys.version_info < (3, 4):
sys.stdout.write("Requires Python 3.x\n")
sys.exit(1)
# Load content of 'scrips' folder as 'acyls' module
# just don't want change current directory structure with 'scripts' and 'scalable' pair
scripts = imp.load_source('scripts', os.path.join(os.path.dirname(os.path.abspath(__file__)), "__init__.py"))
sys.modules['acyls'] = scripts
# Load main app
from acyls.lib.mainwindow import MainWindow
# Set current working directory to be able use relative path in config
os.chdir(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
# Run application
if __name__ == "__main__":
MainWindow()
Gtk.main() |
It worked \o/ |
Good, thanks for cooperation, I will commit fix to repo sometime soon then. |
Hello,
after a fresh install of your very tempting program, i have the following issue :
Is there a missing file or is this something i can fix by editing a file ?
Best regards.
EDIT
I'm no dev, but maybe this has something to do with this part of run.py ?
The text was updated successfully, but these errors were encountered: