python swig : ImportError wrong ELF class: ELFCLASS64

2024/11/16 11:30:29

I am trying to interface from python to c++ code via swig. I get the following error , while trying to execute my script.

File "./driver.py", line 4, in <module>from fixMessageSim import *
File "/var/user/pradyotd/testframework/fixMessageSim.py", line 12, in <module>import MessageFactory
File "/var/user/pradyotd/testframework/MessageFactory.py", line 25, in <module>_MessageFactory = swig_import_helper()
File "/var/user/pradyotd/testframework/MessageFactory.py", line 21, in swig_import_helper_mod = imp.load_module('_MessageFactory', fp, pathname, description)
ImportError: /var/user/pradyotd/testframework/_MessageFactory.so: wrong ELF class: ELFCLASS64`

when I run file on the .so I get

_MessageFactory.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, not stripped

similarly for python

/usr/bin/python: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

So I am not clear why a 64-bit .so would complain.

thanks

Answer

It would appear, that the interpreter I thought I was using , was not the one in the file. This appears to be a non-issue.

https://en.xdnf.cn/q/118936.html

Related Q&A

cnn news webscraper return empty [] without information

so i wrote this code for now: from urllib import request from bs4 import BeautifulSoup import requests import csv import reserch_term = input(What News are you looking for today? )url = fhttps://editi…

Why the code shows all the addition process?

Code: sum=0 for i in range(10,91):sum=sum+iprint(sum)When I wrote this code, the answer was Output: 10 21 33 46 60 75 91 108 126 145 165 186 208 231 255 280 306 333 361 390 420 451 483 516 550 585 621 …

Creating a list of keywords by scrolling through a dataframe (python)

I have a dataframe that looks like this: dataFrame = pd.DataFrame({Name: ((" Verbundmrtel , Compound Mortar , Malta per stucchi e per incollaggio "),(" StoLevell In Absolute , StoLeve…

How to click this button with python selenium

Im looking to click the button highlighted in the screenshot below; have tried with pyautogui but found results to be inconsistent so trying selenium instead.Im having trouble identifying the button to…

How to find the average of numbers being input, with 0 breaking the loop?

I just need to figure out how to find the average of all these input numbers by the user while using 0 as a exit of the loop. I need to figure out how to eliminate using 0 as part of the average. examp…

NoSuchElementException when loading code using Selenium on Heroku

Error: ERROR:asyncio:Task exception was never retrieved2022-03-14T14:08:52.425684+00:00 app[worker.1]: future: <Task finished name=Task-30 coro=<Dispatcher._process_polling_updates() done, define…

Python alphanumeric

Problem:I have to go through text file that has lines of strings and determine about each line if it is alphanumeric or not. If the line is alphanumeric print for example "5345m34534l is alphanume…

Python 3 - exec() Vs eval() - Expression evaluation [duplicate]

This question already has answers here:Whats the difference between eval, exec, and compile?(3 answers)Closed 7 years ago.After reading query.below python code is still not clear,>>> exec(pri…

What is the syntax for printing multiple data types in Python? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.Want to improve this question? Add details and clarify the problem by editing this post.Closed 8 years ago.Improve…

When scraping all the div to get the data getting the null list using lxml in python

I want to scrape the product title , product link , product price but when I am using the xpath it is showing the null list . How to add the xpath and for loop to get the above details . I have tried …