Comments (3)
import discid
is not importing discid.py
it tried to import discid.dll
that was in the same folder Oo.
I had all the different dlls in one folder to check them with one git repository.
EDIT:
It doesn't explicitely tell, but when using the Python API in the C library, one can apparently import the dll directly.
See http://docs.python.org/2/extending/extending.html.
from python-discid.
The same thing works on Linux when discid.so
is present. Though it is less likely that this happens, because libraries mostly have the lib
prefix on linux. (especially libdiscid)
Traceback (most recent call last):
File "./examples.py", line 6, in <module>
import discid
ImportError: dynamic module does not define init function (PyInit_discid)
This doesn't happen for Python on Windows directly. Neither opening the file with IDLE, nor using the cmd
(example.py
) or in MSYS (/C/Python27/python.exe example.py
).
Possibly Python for Windows detects this problem and doesn't try to load discid.dll. It would seem weird that the dynamic module feature works on Cygwin, but not on Windows.
In Mac OS X I could reproduce this with discid.so
(normally .dylib
is used for dynamic libraries):
Traceback (most recent call last):
File "./examples.py", line 6, in <module>
import discid
ImportError: dynamic module does not define init function (initdiscid)
from python-discid.
There is no way for me to fix this in discid.py
since that file is not even loaded.
from python-discid.
Related Issues (20)
- Find libdiscid in current folder for linux/unix HOT 2
- Prefer libdiscid in current directory HOT 1
- Darwin default_device breaks module tests HOT 4
- disc access test suite
- consider using `discid_read_sparse` when/if implemented in libdiscid HOT 2
- Uninformative error on Windows when libdiscid is not found HOT 1
- reconsider track_offsets[0], track_lengths[0] etc. HOT 2
- Don't expose discid_get_webservice_url HOT 2
- Don't make DEFAULT_DEVICE a constant HOT 2
- add get_devices() function? HOT 3
- leaks many file descriptors HOT 1
- Ask user to re-enter user/password on authentication errors HOT 1
- py2app dmg/dylib problems again HOT 4
- On Windows system wide discid.dll seems to be preferred over local version HOT 5
- Doc fails to build with sphinx 1.3 HOT 1
- Split up DiscError HOT 1
- macOS: Prefer libdiscid.dylib in current folder HOT 2
- Add gpg key HOT 1
- tests relying on /dev/cdrom failing when running with pytest
- Invalid TOC seemingly generated (MBS-10050)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-discid.