Highcharts-convert missing labels - highcharts-convert

I have the same code, running the same highcharts-convert.js and phantomjs on two servers. One produces perfect charts images the other is missing all labels. Does anyone know why or where to start looking?

This is most likely missing font packages on the failing host. Highcharts-convert uses the fonts available to it, but will silently skip labels if there aren't any available. I had this happen and running
sudo yum install dejavu-fonts-common dejavu-sans-fonts dejavu-serif-fonts libXfont xorg-x11-fonts-Type1
fixed it. I don't yet know what subset of those packages would have been sufficient, but I suspect "libXfont xorg-x11-fonts-Type1" would do it.

Related

pd.read_excel crashes (hangs) on certain files

FOA I've never had pandas crash (freeze, loop infinitely) on me before. Second it's not the files, they were reading well before.
Doing a bit of research I stumbled upon this issue where the cause is traced back to pd._libs.cp36.
Another similar this
I looked up my own pd.libs to find diverse .py files like algos.cp38-win....
A couple things fell to mind. First that I upgraded to python 3.8.
Environment is called work38 btw
But trying on a different environment didn't work
The only other thing is that I installed fbprophet. To install fbprophet I installed pystan.
To install pystan I had to run this command as per their docs
conda install libpython m2w64-toolchain -c msys2.
There are many guides to installing pystan that encourage you to install in a particular order (first pystan, then numpy cython pandas etc). Idk if there's a reason for this.
In any case, my idea is that the code above f***ed up my whole anaconda environment with some c compilers and now pandas is broken in all environments, even if I pip uninstall & pip install --no-cache-dir pandas.
2 Questions:
First one is, do you know what's happening here? Could you explain me?
And second, any idea how I can repair this? Or must I uninstall anaconda an reinstall everything (then of course pip install -r requirements.txt)
Edit: Maybe the C compiler stuff is unrelated. I just let read_excel run for a painful amount of time and it returned a dataframe with 65000 rows and 250 columns.
I see that when I convert the xlsx to csv (with a CLI script) the csv contains a bunch of empty rows and columns.
TLDR: I have an xlsx file with 250 rows and ~20 columns but apparently the empty cells aren't empty?

How to determine if it is safe to remove folders suggested by pkgsrc update?

When updating and upgrading pkgsrc and its packages using
sudo pkgin -y update
sudo pkgin -y full-upgrade
sudo pkgin -y autoremove
it suggested that some directories could be deleted:
downloading packages...
p5-Variable-Magic-0.62.tgz 100% 42KB 41.6KB/s 41.6KB/s 00:00
p5-Role-Tiny-2.000006.tgz
...
removing packages to be upgraded...
removing pkgin-0.9.4nb7...
===========================================================================
The following files are no longer being used by pkgin-0.9.4nb7,
and they can be removed if no other packages are using them:
/opt/pkg/etc/pkgin/repositories.conf
===========================================================================
===========================================================================
The following directories are no longer being used by pkgin-0.9.4nb7,
and they can be removed if no other packages are using them:
/opt/pkg/etc/pkgin
/var/db/pkgin
===========================================================================
removing p5-PerlMagick-7.0.7.8nb1...
removing jasper-2.0.12...
...
My question is that how does one determine if no other packages are using the directories suggested above so they can be deteled? Simply ignoring this step and deleting them does not seem safe.
Those messages are, for the most part, really just for the pedants who would worry and fuss over things that they no longer need and might get confused by, even when they don't cause any problems or get in the way of anything. (Such leftovers could possibly be of some concern if one was working on changing the package they were used by.)
In this particular case though the messages are actually misleading since they are about components used by pkgin itself and once pkgin upgrades itself they will in fact be in use again. One might even consider the appearance of those messages in this case to be a bug.

Textext (Inkscape), GhostScript and MaTeX (mathematica) compatibility

The following question has to do with installation of the MaTeX package to Mathematica, and the difficulties I encounter in making it compatible with Inkscape’s Textext (LaTeX addon).
I first summarize my problem in Long story short (I have the detailed series of events in Long story). I then present my questions in Questions and supply some additional information regarding versions of the various programs in Supplementary Information.
Long story short
I am having issues with using both Textext add-on in Inkscape and MaTeX package in Wolfram's Mathematica. I have tried uninstalling and re-installing all related Inkscape programs but nothing seems to change.
Long story
I am using Inkscape to produce figures with LaTeX code (using textext according to this guide https://people.orie.cornell.edu/jmd388/design/guides/textext.pdf). I have previously installed Textext, and Inkscape was working well – allowing me to include LaTeX text in my figures.
I am also using Wolfram Mathematica. To include LaTeX text in Mathematica I needed to install the MaTeX package (from here https://github.com/szhorvat/MaTeX). However, once I did this, Textext stopped working.
I have uninstalled and reinstalled all inkscape’s related programs – pstoedit, ghostscript, GSview, ImageMagick, Textext and Inkscape itself – but still MaTeX wouldn’t work. Textext seems to be working now, but MaTeX does not.
The error Mathematica gives when running the MaTeX package is the following
MaTeX::gserr: Error while running Ghostscript.
After examinning this issue, I have realized that the problem might originate from the Ghostscript version. I have ran the following line in the command:
gswin64c.exe -o mt-gs.pdf -dNoOutputFonts -sDEVICE=pdfwrite mt.pdf
and the outcome I obtain is
**** Could not open temporary file ''
****Unable to open the initial device, quitting.
But when I only put
gswin64c.exe -o mt-gs.pdf -dNoOutputFonts mt.pdf
Ghostscript seems to operate (that is, a pdf window pops-up and immediately closes).
Additionally, when I try to run GS on a different pdf file, I get the following error
Could not open the scratch file encoded_file_ptr_0.
+ c:\users\cjl\artifex\gs-release'9.21\ghostpdl-9.21\base\gdevp14.c:6044: gs_pdf14_devide_push<>: Fatal
GPL Ghostscript 9.21: Unrecoverable error, exit code 255
where the same file works on a different computer's GS (so the file should be OK).
Overall, I cannot use MaTeX at the moment since I get this error, which forces me to produce figures in Mathematica and move them into Inkscape to include axis labels and other notations (such that the fonts are consistent).
Questions
What is wrong with my Ghostscript? How can I fix it?
Has anyone encountered such difficulties before (making Textext and MaTex packages work at the same time)?
Does anyone have an idea of how to fix MaTeX/Textext such that both would work?
Supplementary information
Here are the specs of my OS, as well as the versions of the different involved programs:
Windows 7 64-bit OS.
Mathematica verion 11.1.1.0 for Windows 64-bit.
Inkscape version 0.48
Ghostscript version 9.21
pstoedit and importps version 3.7
ImageMagick version 7.0.7 - Q16
Textext version 0.4.4
MiKTeX 2.9 (updated today).
I would really appreciate any comments and ideas.
Thanks in advance
There is nothing wrong with your Ghostscript command, but the pdfwrite device requires the ability to write temporary files to the system temporary directory. (other devices such as the default display device do not always require the ability to write temporary files)
The empty filename is suspicious in the error, that should not be possible.
There is clearly some kind of problem because the file 'encoded_file_ptr.0' couldn't be created either apparently, and that's a valid filename.
I'd have to guess at some kind of permissions problem. I note that you are running a Windows Ghostscript, are you running this under some kind of Linux-alike ? I'd be suspicious that there is some kind of permissions or access problem on the temp partition if so.
Have you tried running Ghostscript from the WIndows command shell ?

Local Monticello repository

I would like to run a local Monticello HTTP repository at work, so that we can share code easily among colleagues.
Is there a way to run something similar to SmalltalkHub privately?
EDIT:
I have tried all the options here and neither of them seems to work smoothly. Let me recap the options:
1) WebDAV on Apache, following Stuart. I have tried it, following some online guides. My current dav.conf looks like this:
DavLockDB /tmp/DavLock
Alias /pharo /opt/data/pharo
<Location /pharo>
Order Allow,Deny
Allow from all
Options Indexes MultiViews
Dav On
AuthType None
</Location>
I worked for a few days. Then suddenly I am not able to read new versions of a certain package. Whenever I write a version in an image and read it in another one, I get an exception ZnInvalidUTF8. I am not sure why, it may be that WebDAV has issues listing too many files?
2) Setting up my FTP. It seems to work, but when I try to set this repository as a remote in the versionner I get MCFtpRepository doesNotUnderstnd: #koRemote
3) SqueakSource3, following Tobias. I have tried running the two Gofer commands in both Pharo2 and Pharo3. In Pharo2 it does not load at all. In Pharo3, more or less everything works. I had to fix a few errors due to deprecated or removed messages, but in the end I am able to create projects and write to them.
The problem arises when I read. Apparently SS3 keeps some kind of internal cache. The result is that the list of packages I see on the project page is different from the list of packages that the client gets. The difference seems to be that the client requires a short version of the page, like http://localhost:8080/ss/MyProject/?C=M;O%3DD, and the results there are consistently less than in the full page http://localhost:8080/ss/MyProject.
Moreover, even on the project page, the list of versions remains cached until I navigate on a different project.
4) SmallTalkHub, following Sean. I have tried both using images from the INRIA server and images suggested from the Pharo-VM-loader (they may be the same).
I had to install Seaside again, since there was no ZnZincAdaptor in the downloaded image. I am now able to start SmallTalkHub, but as soon as I try to register a user, I get an error MessageNotUnderstood: receiver of "new" is nil. I am not able to track where this error comes from (is there a way to open a server-side debugger instead of returing 500 in Seaside?).
After this error, I can see a user both in mongodb and in the interface, but I am not able to login.
5) Git using filetree, as suggested by Kylon. This would prevent me from using MetaCello to handle dependencies and looks even more compelx than the other options.
At this point I am at a loss. :-( If I want to use Pharo, I will need to be able to collaborate with my colleagues. Using open source repositories is not an option, at least right now.
Is there a simple, tried and tested way to set up such a repository?
SqueakSource3 or SmallTalkHub would be even better, thanks to their user interfaces, but I really need at least basic collboration. Having an option that can run on a headless server would also be a big plus, as if this becomes a tool we use, it will not be doable to host the repository on my laptop.
Per this thread on the Pharo Dev mailing list:
Setting up the Server:
Download a SmalltalkHub image (https://ci.inria.fr/pharo-contribution/job/SmalltalkHub/)
Install mongodb on your computer (for Debian: apt-get install mongodb)
Launch the SmalltalkHub image
Evaluate: ZnZincServerAdaptor startOn: 8080
Visit http://localhost:8080/tools/hub, create an account and a project
In addition to Sean's answer - if you just want a Metacello repository, and don't necessarily need the full SmalltalkHub stuff, then you just need a WebDav server. Apache will work fine, and I've even used Confluence's WebDAV support (with some tweaking) successfully in the past.
In addition to the other answers:
Just storing your versions in DropBox work very well!
You can also install SqueakSource3 (like SmalltalkHub, doesn't need MongoDB):
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main';
package: 'ConfigurationOfSeaside3';
load.
((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) load.
Gofer new
url:'http://www.squeaksource.com/MetacelloRepository';
package: 'ConfigurationOfSqueakSource';
load.
((Smalltalk at: #ConfigurationOfSqueakSource) project version: #bleedingEdge) load: #('All').
Then start your Adaptor (eg ZnZincServerAdaptor startOn: 8080) and goto http://localhost:8080/instalSS
Another way is go down the popular route of Git. I am using Github for my projects and it works great while Git itself works very well locally too. So if are already familiar with Git then its a very good choice
You can find more information here https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/lastSuccessfulBuild/artifact/GitAndPharo/GitAndPharo.pier.html
Sorry about the bad smalltalkhub experience. I have made some fixes to the configuration, and need to check if that is enough

httpd.config error when insntalling mod_wsgi+django

its been more than 2 weeks. i try to instal but still getting error.
firstly, indeed I have searched similar error but i didn't find solution at all. if you find it. please let me know.
second, this is my state :
1. i have installed python 2.7 and django 1.5.1 (it works).
2. i also install MAMP.
3. i try to configure mod_wsgi and want it integrated with my MAMP apache server.
4. using mac mountain lion 10.8.4
my configuration file :
/etc/apache2/original/extra/httpd-userdir.conf inside my apache2/original/extra/
/etc/apache2/users/akhyar.conf pastebin.com/zcY58WTV (sorry about this Iam new on stack overflow)
/etc/apache2/httpd.conf pastebin.com/je2D8zMz
third, this is my error :
when i run apachectl configtest this error appears my error
so, what is going on actually? can someone tell me why and show me the mistakes?
if its been solved, what is the next step for configuring mod_wsgi on my MAMP?
thanks before, any help are highly appreciated.
In this file, line 15, you're including the per-user conf files:
http://pastebin.com/7y7ibuqP
On line 473 of this one, one of those per-user conf files, you're including the above file again:
http://pastebin.com/zcY58WTV
This causes infinite recursion while trying to parse the conf files.
I think there are some other errors too, and to be honest the files are pretty messy, but the best way forward is to remove all Include directives from akhyar.conf. For the most part they're already duplicates, where they're not, inline the contents of those files instead of using Include. If there are other errors, you'll at least see useful line numbers to start tracking them down.
Also note that the [warn] lines are just warnings - which you should probably fix, but the server will still run without them, that's not what's causing the error.