Comments (4)
another manifestation reported by @mvdoc:
https://travis-ci.org/duecredit/duecredit/jobs/75193538
======================================================================
ERROR: duecredit.tests.test_injections.test_no_double_activation
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/travis/build/duecredit/duecredit/duecredit/tests/test_injections.py", line 142, in test_no_double_activation
injector.activate()
File "/home/travis/build/duecredit/duecredit/duecredit/injections/injector.py", line 219, in activate
raise RuntimeError("__import__ is already duecredited")
RuntimeError: __import__ is already duecredited
-------------------- >> begin captured logging << --------------------
duecredit: WARNING: _orig_import is not yet known, so we haven't decorated default importer yet. Nothing TODO
--------------------- >> end captured logging << ---------------------
from duecredit.
I think it is Python bug somewhere... not sure where or how, but I do not see how
print("Assigned4: %s" % DueCreditInjector._orig_import)
globs = glob(ptrn)
print("Assigned5: %s" % DueCreditInjector._orig_import)
could result in
Assigned4: <built-in function __import__>
Assigned5: None
from duecredit.
btw, "bug" goes away also if there is more output, e.g. running nosetests with -v or dumping output at higher DUECREDIT_LOGLEVEL.
from duecredit.
it is so much more fun! e.g. if I remove .pyc files -- we work fine, but then would fail on the next run:
2 11919.....................................:Wed 12 Aug 2015 06:48:30 PM EDT:.
(git)hopa:~/proj/duecredit[pr-41]git
$> find -iname *pyc -delete
2 11920.....................................:Wed 12 Aug 2015 06:48:46 PM EDT:.
(git)hopa:~/proj/duecredit[pr-41]git
$> .tox/py27/bin/nosetests -s duecredit
.......2015-08-12 18:48:49,620 [ERROR ] Just use nosetests duecredit for now (NotImplementedError) (main.py:178)
.....................SS.......2015-08-12 18:48:49,633 [WARNING] Seems that we are calling duecredit_importer twice. No harm is done but shouldn't happen (injector.py:280)
...2015-08-12 18:48:49,635 [WARNING] _orig_import is not yet known, so we haven't decorated default importer yet. Nothing TODO (injector.py:330)
.........SSSSSSSS
----------------------------------------------------------------------
Ran 57 tests in 0.088s
OK (SKIP=10)
2 11921.....................................:Wed 12 Aug 2015 06:48:49 PM EDT:.
(git)hopa:~/proj/duecredit[pr-41]git
$> .tox/py27/bin/nosetests -s duecredit
.......2015-08-12 18:48:51,144 [ERROR ] Just use nosetests duecredit for now (NotImplementedError) (main.py:178)
.....................SS..2015-08-12 18:48:51,156 [ERROR ] For some reason self._orig_import is None. Importing using stock importer to mitigate (injector.py:253)
2015-08-12 18:48:51,156 [ERROR ] For some reason self._orig_import is None. Importing using stock importer to mitigate (injector.py:253)
Traceback (most recent call last):
File ".tox/py27/bin/nosetests", line 11, in <module>
sys.exit(run_exit())
File "/home/yoh/proj/duecredit/.tox/py27/local/lib/python2.7/site-packages/nose/core.py", line 121, in __init__
**extra_args)
File "/usr/lib/python2.7/unittest/main.py", line 95, in __init__
self.runTests()
File "/home/yoh/proj/duecredit/.tox/py27/local/lib/python2.7/site-packages/nose/core.py", line 207, in runTests
result = self.testRunner.run(self.test)
File "/home/yoh/proj/duecredit/.tox/py27/local/lib/python2.7/site-packages/nose/core.py", line 62, in run
test(result)
File "/home/yoh/proj/duecredit/.tox/py27/local/lib/python2.7/site-packages/nose/suite.py", line 177, in __call__
from duecredit.
Related Issues (20)
- References are not deduplicated in a bibtex summary HOT 3
- Ci testing fails
- How to cite duecredit? HOT 5
- Use DueCredit for data files HOT 2
- Deprecation warning for due credit. HOT 3
- [wishlist] interface to templating engines (e.g. ninja) to provide users a flexible way to render reports
- [wishlist] option (env var) to not load existing .duecredit.p upon start
- Help adding duecredit HOT 20
- Enable duecredit by default, but without injections
- SciPy injection is outdated HOT 3
- Switch from WARNING to DEBUG for outdated injections etc
- Best practices for integrating conditional dcite decorators into Nipype workflows? HOT 2
- DueCredit internal failure while running <function DueSwitch.dump ... on Windows 10 HOT 5
- Improve usage in Jupyter HOT 2
- Internal error: Both inactive and active collectors should be provided HOT 1
- [wishlist] Can duecredit be exported as codemeta? HOT 1
- DueCredit `cite()` doesn't work and `dcite()` works, but not always HOT 5
- Duecredit API HOT 1
- inactively `@due.dcite`-decorated classes become unpicklable
- ImportError when using duecredit HOT 1
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 duecredit.