calculix / cae

CalculiX Advanced Environment is designed to guide you through the CalculiX keywords creation process and is aimed to help you reach the correct input file with no mistakes.
GNU General Public License v3.0
143 stars 34 forks source link

Can't open the program #8

Closed cfernandesINEGI closed 4 years ago

cfernandesINEGI commented 4 years ago

Hi,

first of all, thank you for the piece of software.

I find the following issue: After sudo ./cae.sh

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' Traceback (most recent call last): File "/home/cfernandes/cae-master/src/cae.py", line 212, in w.initialize() File "/home/cfernandes/cae-master/src/gui/window.py", line 198, in initialize self.d = Xlib.display.Display() File "/home/cfernandes/.local/lib/python3.6/site-packages/Xlib/display.py", line 89, in init self.display = _BaseDisplay(display) File "/home/cfernandes/.local/lib/python3.6/site-packages/Xlib/display.py", line 71, in init protocol_display.Display.init(self, *args, **keys) File "/home/cfernandes/.local/lib/python3.6/site-packages/Xlib/protocol/display.py", line 167, in init raise error.DisplayConnectionError(self.display_name, r.reason) Xlib.error.DisplayConnectionError: Can't connect to display ":0.0": b'No protocol specified\n'

Can you provide some hint?

Best regards, Carlos Fernandes

imirzov commented 4 years ago

Hi, Are you using remote desktop connection? Python Xlib doesn't support it. In this case forget about this program.

cfernandesINEGI commented 4 years ago

Hi,

no I am using native Ubuntu 18.04 LTS.

Thank you

imirzov commented 4 years ago

Please, check if Python Xlib is installed on your system with command:

pip install xlib

cfernandesINEGI commented 4 years ago

Yes,

I had installed already: Successfully installed six-1.15.0 xlib-0.21

imirzov commented 4 years ago

Ok, then run command: echo $DISPLAY It should return something like ":0.0"

cfernandesINEGI commented 4 years ago

Yes,

it returns :0.0

imirzov commented 4 years ago

Well, then I do not know. Sorry. Try googling "Can't connect to display :0.0 No protocol specified"

cfernandesINEGI commented 4 years ago

Thank you for your help. If I find a solution, I put here.

cfernandesINEGI commented 4 years ago

Another small issue, that I found was:

So I changed the src/cae in line 7 to cae.py, then it passes but gives the xlib problem

imirzov commented 4 years ago

Please, report if you'll manage to fix your system's configuration. I understand the importance of user friendliness of the software. So, the program should be able to point to user where the problem is. But now we have what we have.

cfernandesINEGI commented 4 years ago

I fixed the problem...

  1. change cae.sh in line 7 and 11 to exec "$DIR/src/cae.py"
  2. give permission to all files on the package to "allow this file to run as a program"
  3. on terminal "xhost +"
  4. run "./cae.sh"

It works perfectly, thank you

imirzov commented 4 years ago

No, do not change cae.sh! It shouldn't point to source file. It points to binary executable! If you're trying to run program from sources - run command "python3 cae.py" from "src" folder.

cfernandesINEGI commented 4 years ago

If you not change it, gives:

line 11: /home/cfernandes/Downloads/cae-master/src/cae -inp model.inp: No such file or directory

imirzov commented 4 years ago

So, that's the real issue! Are you using sources or binaries? I'd recommend to use binaries. Download here: https://github.com/calculix/cae/releases

imirzov commented 4 years ago

For everything to be clear I've updated "How to use" section in the README: https://github.com/calculix/cae#how-to-use

cfernandesINEGI commented 4 years ago

Thank you for your time, and sorry for for poor understanding of the program usage! Using the binaries the error is different: Fontconfig error: Cannot load config file from /etc/fonts/fonts.conf

imirzov commented 4 years ago

Looks like this is system problem, not CAE's. The file must be present on system. https://en.wikipedia.org/wiki/Fontconfig

cfernandesINEGI commented 4 years ago

Yes, the file is on my system ...

imirzov commented 4 years ago

The only thing in CAE related to font is file:

https://github.com/calculix/cae/blob/master/config/Window.xml font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;

Not sure this could be the reason of the problem.

imirzov commented 4 years ago

Please, could you attach file ./examples/default.log It can contain some useful information.

cfernandesINEGI commented 4 years ago

the content of default-log:

ERROR: ERROR! Can't get CalculiX GraphiX window. ERROR: ERROR! Can't get CalculiX GraphiX window ID.

imirzov commented 4 years ago

Aha! That's what I'm working on right now. Wait for the next release. It'll be very soon. Or you can checkout latest source code and use it instead of binaries - most of this problem is already fixed. https://github.com/calculix/cae/archive/master.zip

cfernandesINEGI commented 4 years ago

Thank you, I will wait for the next release. Thank you for your work!

imirzov commented 4 years ago

CalculiX CAE v0.7 https://github.com/calculix/cae/releases/tag/v0.7

cfernandesINEGI commented 4 years ago

Dear imirzov,

unfortunately the new release keep the same behaviour on my machine. So, I assume that the problem is on my side. Thank you for all your work.

Best regards, Carlos Fernandes

imirzov commented 4 years ago

Dear Carlos,

Please, could you attach your ./examples/default.log from the new release?