Update scour under Windows

Asked by carmen fierro

Hello!
Five days ago I asked a question, which boiled down to a bug in scour, which I finally reported there. Now the scour team tell me that said bug has been solved, with others, in latest scour update.
MY PROBLEM: I am under Windows, AND HAVE NOT ANY INDEPENDENT RUNNING PHYTON.
Is there a way for me to update my running Inscape installation with last scour issue?
They warn that installing said new release 'requires pip', and I see several pip*.exe in C:\Program Files\Inkscape\python\Scripts, but that is as far as I can get by my poor unaided self...
Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
Hachmann
Solved:
Last query:
Last reply:
Revision history for this message
Hachmann (marenhachmann) said :
#1

If you're feeling adventurous, and know how to make a backup first(!), you can try searching on your disk for the files from this list:
https://github.com/scour-project/scour/tree/master/scour
and replace them.

Might work, or maybe not. It's a development version, so not deemed stable.

Revision history for this message
Hachmann (marenhachmann) said :
#2

(btw. that change is NOT available via pip yet, only in the development version).

Revision history for this message
carmen fierro (cfierrob) said :
#3

Thanks for your answer, BUT IT DOESN'T WORK.
- Located the right folder (byr searching for svg_regex.py--other files give multiple addresses)
- Made a copy of it (which works fine as backup--nothing more required)
- Copied the new files--administrative rights required for substitution
- Ran Inkscape and asked to Save as Optimized SVG--> Error! 'Pithon couldn't load scour--wrong call in some file or other'--use PIP to install
- Copy back the original files and test again--everything works fine--including the unsolved bug, still unsolved, of course.

Please, is there some other available workaroud? Or MUST one wait for an Inkscape update?

Thanks!

Revision history for this message
Hachmann (marenhachmann) said :
#4

I think I'd probably be able to debug this 'live', when I can put my hands on it, and get the output directly in front of me, but I hesitate doing this via the internet. I'm also not a Windows user, and have never had Inkscape installed on Windows, so it would be a slow trial-and-error approach for me.

Btw. I wasn't able to find the discussion where you and probably Eduard talked about pip, only the bug report where Eduard fixed the error (and I repeat: the bugfix is not yet available via pip. On https://pypi.python.org/pypi/scour, the latest available version is 0.35, and this version is older than the bugfix, which was only made 6 days ago, see https://github.com/scour-project/scour/issues/145).

But we can try to find out how to do it, so when it's available, you can just repeat the steps. Can you point me to where that discussion about pip happened?

Revision history for this message
Hachmann (marenhachmann) said :
#5

correction: 4 days ago.

Revision history for this message
carmen fierro (cfierrob) said :
#6

Sory, I didn't get the referene to pip in the answer to my question, but
through a link to code in said answer, which brought me here
https://github.com/scour-project/scour/tree/cc592c8e8a870aa7d76d54413c7bf3f69310898e
where there is the reference to 'use pip to install' both the stable
release, and the latest patch in 'master' (with a link for pip and the
warning of the code being possibly broken).
As I think I said, I am an end user, and the very little I can understand
of phyton just comes from adding plug-ins to Calibre and the Gimp--just
enough, in fact, to suspect that adding a patch to a part of a distribution
was likely to be a horse of another colour...
However, and if an update to scour (or to any other component) is likely to
become avaible before/independently of a new Inkscape release, I would
still be very thankful for a guideline on how to implement it: I have
disliked the command line since first meeting it under MSDos 3.2, but I can
use it at a pinch, if required.
Thanks again!

Carmen

2017-05-21 16:19 GMT+02:00 Hachmann <email address hidden>:

> Your question #633288 on Inkscape changed:
> https://answers.launchpad.net/inkscape/+question/633288
>
> Hachmann posted a new comment:
> I think I'd probably be able to debug this 'live', when I can put my
> hands on it, and get the output directly in front of me, but I hesitate
> doing this via the internet. I'm also not a Windows user, and have never
> had Inkscape installed on Windows, so it would be a slow trial-and-error
> approach for me.
>
> Btw. I wasn't able to find the discussion where you and probably Eduard
> talked about pip, only the bug report where Eduard fixed the error (and
> I repeat: the bugfix is not yet available via pip. On
> https://pypi.python.org/pypi/scour, the latest available version is
> 0.35, and this version is older than the bugfix, which was only made 6
> days ago, see https://github.com/scour-project/scour/issues/145).
>
> But we can try to find out how to do it, so when it's available, you can
> just repeat the steps. Can you point me to where that discussion about
> pip happened?
>
> --
> You received this question notification because you asked the question.
>

Revision history for this message
Best Hachmann (marenhachmann) said :
#7

I just tested in a virtual machine with Windows 7, and it worked perfectly - optimized SVGs now keep all their markers.

What I did:
- download scour zip from https://github.com/scour-project/scour/archive/cc592c8e8a870aa7d76d54413c7bf3f69310898e.zip
- save, unpack
- open folder in downloaded scour: scour-master\scour
- open folder in Inkscape install: C:\Program Files\Inkscape\python\Lib\site-packages\scour
- (make backup - skipped this...)
- delete all files in the folder in the Inkscape install
- copy all .py files from the indicated directory from the zip file into the folder C:\Program Files\Inkscape\python\Lib\site-packages\scour

This is not the recommended way of doing things, but it's quick, and I have no idea how to use the pip that comes with Inkscape (or if it's possible to use it at all - it might need some tweaks to install into the correct location).

Revision history for this message
carmen fierro (cfierrob) said :
#8

Worked like a charm!
Just opened the zip in 7zip, dropped the files from folder scour into C:\Program Files\Inkscape\python\Lib\site-packages\scour, confirmed administrator permit (I changed to administrator account--some things in Windows7 won't work othwerwise, however much pemits and passwords one gives) and tried Inkscape-->'save copy as Optimized svg' from both administrator and user accounts. Not a single trouble, intermediate markers showing, and size of Optimized svg not visibly increased.
Thank you very much!

Revision history for this message
Hachmann (marenhachmann) said :
#9

You're welcome, Carmen.
So you think it might have been a permission issue?

Revision history for this message
carmen fierro (cfierrob) said :
#10

I think NOT--I followed exactly the same procedure the other time. The
trouble must come from the packaged files being DIFFERENT from the ones I
downloaded individually--although just now I haven't got installed an
ExamDiff tool, a quick look in Notepad at two of those files with same name
(something*css*, chosen for being quite short) shows that they're not even
alike... Not knowing the logic behind those posts, I don't pretend to
understand the issue--but I think the difference in the files is a fact,
and enough to explain the previous failure.

Carmen

2017-05-21 23:03 GMT+02:00 Hachmann <email address hidden>:

> Your question #633288 on Inkscape changed:
> https://answers.launchpad.net/inkscape/+question/633288
>
> Hachmann posted a new comment:
> You're welcome, Carmen.
> So you think it might have been a permission issue?
>
> --
> You received this question notification because you asked the question.
>

Revision history for this message
Hachmann (marenhachmann) said :
#11

Ah, then probably you saved the github html pages, instead of the contents of the *.py files.
You wouldn't be the first person where that happened.

If you want to grab single files from github, you need to manually copy-paste their contents into an empty text file and name that text file like the file on gitlab. Or extract them from the zip that is offered for download, of course.

Revision history for this message
Hachmann (marenhachmann) said :
#12

correction: gitlab -> github

Revision history for this message
carmen fierro (cfierrob) said :
#13

Of course that was the trouble--and I am no end of a fool, not to have
noticed.
Sorry for the unnecessary bother, and thanks again!

Carmen

2017-05-22 1:53 GMT+02:00 Hachmann <email address hidden>:

> Your question #633288 on Inkscape changed:
> https://answers.launchpad.net/inkscape/+question/633288
>
> Hachmann posted a new comment:
> Ah, then probably you saved the github html pages, instead of the contents
> of the *.py files.
> You wouldn't be the first person where that happened.
>
> If you want to grab single files from github, you need to manually copy-
> paste their contents into an empty text file and name that text file
> like the file on gitlab. Or extract them from the zip that is offered
> for download, of course.
>
> --
> You received this question notification because you asked the question.
>

Revision history for this message
Hachmann (marenhachmann) said :
#14

No fool, as far as I can see - you seem to not be afraid of trying out new things, nor of doing some research on your own. It was a pleasure to assist you!