Comments (8)
UNC paths are supported on windows. To solve your issue you can set the module variable as follows:
import schedula.utils.drw as mdl
setattr(mdl, '_UNC', '')
from schedula.
What if longer than 260 chars is needed?
from schedula.
You have to solve the problem with the CMD.EXE
.
from schedula.
So i guess the answer to my "what if" question is that "without UNC paths, schedula
will fail for longer than 260-char paths", correct?
And that is why you suggest to fix the CMD problem. correct?
Now, that CMD.exe, i wouldn't be so assertive it is my problem...
from schedula.
Please re-open.
The issue is caused by a difference in the way Graphviz
suite installs on Windows,
- when downloading and installing it from the site, or
- when using
conda install graphviz
.
TL;DR, in conda, the default executable extension is BAT, not exe, and BAT cannot handle UNC paths as CWD.
Normally there wouldn't be an issue, if schedula
were not using UNC-paths.
(problem reported also in respective feedstock conda-forge/graphviz-feedstock#34)
Workaround
The dot.exe
in conda's Graphvis in inside graphviz/
dir from where the bat is installed:
def is_conda():
return os.path.exists(os.path.join(sys.prefix, 'conda-meta'))
if os.name == 'nt' and not os.path.splitext(prg)[1] and is_conda():
monkeypatch_graphviz()
The monkeypatch_graphviz()
must change the lines graphviz/backend.py#L124-L125
from this:
if PLATFORM == 'windows':
engine = '%s.bat' % engine
to this:
if PLATFORM == 'windows':
engine = 'graphviz\%s.exe' % engine
NOTE: you wont find the "from" lines in the original sources of the graphviz
project, or in a non-conda Python - these lines are delivered by a conda-patch.
from schedula.
I'm sorry but your patch is invalid. You have used the wrong graphviz
library (conda install -c conda-forge graphviz
).
The graphviz
requirement in schedula
corresponds to conda install -c conda-forge python-graphviz=0.8.4
.
from schedula.
You seem to be confusing:
python-graphviz
(python) andgraphviz
the native OS suite.
The former, depends on the later, you can't have one or the other, you need both in conda.
My patch is a temporary fix for schedula
's UNC paths to play well there, n particular, with python-graphviz
, until they fix this upstream (conda-forge/graphviz-feedstock#34, comment).
from schedula.
But the old version python-graphviz-8.4
indeed solves the problem 👍
(reported in graphviz-feedstock-34).
I'm not asking to add this version-boundary to scheula
s setup.py
since is only involves conda environments - not PyPi packages.
from schedula.
Related Issues (19)
- Pre releases do not work with readthedocs HOT 2
- Dispatch directive pfails with missing search_image_for_language() HOT 1
- DRY when adding sub-dispatch nodes HOT 11
- doc: dispatch directive fails in ReadTheDocws HOT 8
- No wheel released in PyPi repo HOT 1
- Site fails with sphinx 1.6.2 HOT 2
- chore: filter out commits from irrelevant files in git history HOT 1
- Repeatitive use of identical try...except blocks in Sol.py HOT 1
- importing `schedula` imports every module there is HOT 1
- Build as "universal" wheel
- Remove nose from `setup_requires` HOT 1
- Getting node ID with % crashes
- Schedula broke with latest networx 2.4 due to dropped graph.node attribute HOT 1
- Split `schedula` into 2 or more packages, with the one with the very barebone serial small implementation HOT 2
- Jinja templates should use autoescape=True to reduce risk of template injection HOT 3
- Advice on reducing memory usage of schedula for large Excel sheet from formulas
- Get one liner formula from graph node HOT 2
- Loop detection and remedy HOT 2
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 schedula.