Ошибка при выполнении операции imagemagick 1с

Перейти к контенту

Доброго всем надо уменьшить размер картинки из 1С8 запускаю из командной строки C:ImageMagickmogrify -resize 50% E: mp mpfile.jpg все работает КомандаСистемы («C:ImageMagickmogrify -resize 50% E: mp mpfile.jpg») нивкакую ((( уже и кавычек пробовал тыкать везде где можно, и в путях и в ключах сделал bat файл C:ImageMagickmogrify -resize 50%% E: mp mpfile.jpg pause запускаю из ОС — работает запускаю из 1С — нифига пишет в окне bat unable to load module <путь>IM_MOD_RL_JPEG.dll — не найден указанный модуль. по пути пробежался глазками — модуль на месте что за засада то? (((

IrfanView достаточно удобен для этого

Не понятно — почему ссылка не на екзешник?

КомандаСистемы(«magick.exe convert «»C:ImageMagick est.jpg»» -resize 50% «»C:ImageMagick est_new.jpg»»», «»»C:ImageMagick»»»); У 1С должен быть доступ к каталогу.

— тоже самое да и обернуто все в бат-файл. из ОС работает из 1С нет

тоже никаких изменений ни ошибок ничего блин не пишет. просто отрабатывает и ничего с файлом не меняется. когда в bat обернуто хоть видно было что с ошибкой «модульне найден» работает. он даже new файл не создал

запуститьприложение( с параметром ожидатьзавершения добавить каталог imagemagick в path или указывать рабочий каталог как параметр запуститьприложение

яяяятьььь!!!!! 3 часа бьюсь лбом об стену перезапустил 1С — все работает как в и из 1с и из ОС

Тэги:

Комментарии доступны только авторизированным пользователям

Добрый день!

После установки 1C сервера 8.2.17 на ALT Linux 7.0 Centaurus, при попытке открыть БД клиентом, выдается: «ошибка инициализации графической подсистемы»

Пакет 1с-preinstall установлен, но скрипт ./config_server все равно не хочет видеть либы ImageMagick, хотя визуально они есть.

Кто-нибудь сталкивался?

« Последнее редактирование: 28.11.2013 18:16:48 от ros_t »


Записан


Отвечу сам себе:
Помог вот этот пост: http://www.1c-pro.ru/topic47243.html

Собственно, сделал симлинк (дословно):

ln -s /usr/lib64/libMagickWand-6.Q16.so.1 /usr/lib64/libWand.so
не забудьте перезапустить:

/etc/init.d/srv1cv82 restart
Всем спасибо, все молодцы!


Записан



Записан

Андрей Черепанов (cas@)


Хм, жаль мне это руководство не попалось сразу, хотя вопрос изучал с неделю точно. Собственно по этому ALT и выбрал.

Да, симлинк /usr/lib64/libWand.so.1 присутствовал. Но проблема ушла, пока топорно не сделал симлинк c именем libWand.so :)

Ну я в курсе, что лузер еще тот :))

Спасибо за ссылку на руководство, добавил в избранное.


Записан


Да, симлинк /usr/lib64/libWand.so.1 присутствовал. Но проблема ушла, пока топорно не сделал симлинк c именем libWand.so :)

Ну я в курсе, что лузер еще тот :))

Это не вы, это разработчики 1С такие… :)
Видно, недостаточно для новых версий 1С этого имени, надо ещё и libWand.so. Пойду добавлю.
Спасибо за информацию.


Записан

Андрей Черепанов (cas@)


Это не вы, это разработчики 1С такие… :)
Видно, недостаточно для новых версий 1С этого имени, надо ещё и libWand.so. Пойду добавлю.

Столкнулся с такой проблемой:
Поставил altlinux-7.0.4-centaurus-x86_64 сервер, но 1с сервер был только 32. Ключ у фирмы тоже только 32, поэтому выбора не было.  postgresql использовал для 64 версии.

Все заработало по инструкции. Но при первом обращении толстым клиентом на сервер, причем не в конфигурации, а кнопкой 1с, когда спрашиваются картинки стало ругаться что не хватает libWand.
Библиотеки были все на месте, симлинк скопированы. Но не работает.

Помогло:

apt-get install i586-libImageMagick
ln -s /usr/lib/libMagickWand*.so.1 /usr/lib/libWand.so.1
ln -s /usr/lib/libMagickWand*.so.1 /usr/lib/libWand.so

т.е. не хватило 586 библиотеки. Автоматом пакет 1c-preinstall не поставил и симплики не сделал.
 


Записан

Хочешь понять сам, объясни другому.
«Если уже все испробовал и ничего не помогает — почитай инструкцию»


i73

Posts: 50
Joined: 2016-08-24T18:30:27+00:00
Authentication code: 1151

Convert always returning exit code ‘1’

Hey, I am lost as to why my command is constantly returning ‘1’/»Failed» exit code even though it converts the texture.

Code: Select all

string.Format("convert "{0}" -depth 8 -resize {1}x{1} -sharpen 0x1.5 "{2}.png"", file, size, (file.Split('.')[0] + "_" + size)))

it’s basically «convert ‘image.png’ -resize 32 -sharpen 0x1.5 ‘ image_32.png»

Looking at ‘-Debug all’ I see no Exceptions or Errors in command line, is IM convert returning 1 a bug? Or am I overlooking something?

User avatar

fmw42

Posts: 25562
Joined: 2007-07-03T00:14:51+00:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert always returning exit code ‘1’

Post

by fmw42 » 2017-03-30T02:21:29+00:00

«convert ‘image.png’ -resize 32 -sharpen 0x1.5 ‘ image_32.png»

You seem to have a missing single quote at the end. It should be

Code: Select all

"convert 'image.png' -resize 32 -sharpen 0x1.5 ' image_32.png'"

Check your variables also to see they are evaluating as you expect.

If I do:

Code: Select all

convert logo: -resize 32 -sharpen 0x1.5 result.png
echo $?

0

So a return code of 0 is success. Thus a return code of 1 is failure/error.

snibgo

Posts: 12159
Joined: 2010-01-24T06:01:33+00:00
Authentication code: 1151
Location: England, UK

Re: Convert always returning exit code ‘1’

Post

by snibgo » 2017-03-30T12:08:27+00:00

How do you know convert is returning 1? The code shown merely sets a string. The command isn’t actually executed.

If it does return 1, you should printf the value of string. That might provide a clue.

Please say what version IM you are using.

i73

Posts: 50
Joined: 2016-08-24T18:30:27+00:00
Authentication code: 1151

Re: Convert always returning exit code ‘1’

Post

by i73 » 2017-03-30T17:07:20+00:00

fmw42 wrote: ↑2017-03-30T02:21:29+00:00

«convert ‘image.png’ -resize 32 -sharpen 0x1.5 ‘ image_32.png»

You seem to have a missing single quote at the end. It should be

Code: Select all

"convert 'image.png' -resize 32 -sharpen 0x1.5 ' image_32.png'"

Check your variables also to see they are evaluating as you expect.

If I do:

Code: Select all

convert logo: -resize 32 -sharpen 0x1.5 result.png
echo $?

0

So a return code of 0 is success. Thus a return code of 1 is failure/error.

Sorry my mistake, the

«convert ‘image.png’ -resize 32 -sharpen 0x1.5 ‘ image_32.png»

was just me writing out what I am trying to do, I’m not actually using that. The code I am using is in the <CODE> brace above it.

i73

Posts: 50
Joined: 2016-08-24T18:30:27+00:00
Authentication code: 1151

Re: Convert always returning exit code ‘1’

Post

by i73 » 2017-03-30T17:10:22+00:00

snibgo wrote: ↑2017-03-30T12:08:27+00:00
How do you know convert is returning 1? The code shown merely sets a string. The command isn’t actually executed.

If it does return 1, you should printf the value of string. That might provide a clue.

Please say what version IM you are using.

I know it’s returning a 1 because I have a listener waiting for any exceptions, I don’t understand how it converts the image but returns a 1.

I’m using the IM 6.8 library: ImageMagick-6.8.6-9-Q16-x86-dll

snibgo

Posts: 12159
Joined: 2010-01-24T06:01:33+00:00
Authentication code: 1151
Location: England, UK

Re: Convert always returning exit code ‘1’

Post

by snibgo » 2017-03-30T17:40:24+00:00

I’ve never known convert to return 1 when it shouldn’t. So perhaps your listener code may have a bug.

I suppose you have printed the value of the string when it returns 1. Then you can run that exact command from the command line, and see what it returns.

User avatar

fmw42

Posts: 25562
Joined: 2007-07-03T00:14:51+00:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert always returning exit code ‘1’

Post

by fmw42 » 2017-03-30T17:53:37+00:00

Perhaps the return 1 is not coming from Imagemagick, but from somewhere else in your code.

If you run the same command with variables resolve to their actual value from the command line, does that return 1 or 0?

i73

Posts: 50
Joined: 2016-08-24T18:30:27+00:00
Authentication code: 1151

Re: Convert always returning exit code ‘1’

Post

by i73 » 2017-03-30T19:52:19+00:00

snibgo wrote: ↑2017-03-30T17:40:24+00:00
I’ve never known convert to return 1 when it shouldn’t. So perhaps your listener code may have a bug.

I suppose you have printed the value of the string when it returns 1. Then you can run that exact command from the command line, and see what it returns.

Okay so now we’re getting somewhere, yes I now tossed in the exception and I am seeing errors…

This is my exception:

Failed to run with : ‘convert «C:Usersmy usera.png» -depth 8 -resize 128 -sharpen 0x1.5 «C:Usersmy usera_128.png»‘

When I input that into command:

Code: Select all

convert.exe: unable to open image `C:/Users/my user/Downloads/a.png': No such file or directory @ error/blob.c/OpenBlob/2643.
convert.exe: unable to open file `C:/Users/my user/Downloads/a.png' @ error/png.c/ReadPNGImage/3994.
convert.exe: no images defined `C:/Users/my user/Downloads/a_128.png' @ error/convert.c/ConvertImageCommand/3108.

I don’t know how it can both convert and open images while being unable to open all the images…

I already did try switching up my escape characters with forward and backwards slashes, mixed my quotations with single and double, any advice would help me out.

fmw42 wrote: ↑2017-03-30T17:53:37+00:00
Perhaps the return 1 is not coming from Imagemagick, but from somewhere else in your code.
If you run the same command with variables resolve to their actual value from the command line, does that return 1 or 0?

Yes I tried this already, from what I am putting into my .net code but now I am trying to call the exact line that I am outputting above ^.

User avatar

fmw42

Posts: 25562
Joined: 2007-07-03T00:14:51+00:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert always returning exit code ‘1’

Post

by fmw42 » 2017-03-30T20:00:15+00:00

Your error message says it is unable to open image:

C:/Users/my user/Downloads/a.png

but in Windows, you should be using and not /.

Where is it getting the /? Do IM error messages replace the with /? Sorry I am not a Windows user. So just checking to be sure you typed the correct syntax.

i73

Posts: 50
Joined: 2016-08-24T18:30:27+00:00
Authentication code: 1151

Re: Convert always returning exit code ‘1’

Post

by i73 » 2017-03-30T20:08:17+00:00

snibgo wrote: ↑2017-03-30T19:57:10+00:00
Those error messages didn’t come from that command. The directory names are different.

Yes sorry my mistake, I am typing these out since my outputs are on a Window, other than the directories it’s the exact same code (tried with both forward slashes and backslashes too).

fmw42 wrote: ↑2017-03-30T20:00:15+00:00
Your error message says it is unable to open image:

C:/Users/my user/Downloads/a.png

but in Windows, you should be using and not /.

Where is it getting the /? Do IM error messages replace the with /? Sorry I am not a Windows user. So just checking to be sure you typed the correct syntax.

No worries, I also tried in my c# to use both and / exact same issue with both of them.

Code: Select all

string command = string.Format("convert "{0}" -depth 8 -resize {1}x{1} -sharpen 0x1.5 "{2}.png"", file.Replace('', '/'), size, (file.Split('.')[0] + "_" + size).Replace('', '/'));

Do you guys know why I would get a failed to find image BUT still be able to convert?

Just want to thank you both for helping me out!

i73

Posts: 50
Joined: 2016-08-24T18:30:27+00:00
Authentication code: 1151

Re: Convert always returning exit code ‘1’

Post

by i73 » 2017-03-30T20:11:23+00:00

fmw42 wrote: ↑2017-03-30T20:02:30+00:00
Is convert.exe the IM convert or the Windows convert?

FFS! Yeah, we’re using convert.exe… I over looked that Just had to remove «convert»… Thank you guys so much for your time!!!!!

SOLVED (I’m dumb)

Все добрый день. Я представляю бюджетную организацию, и мы решили попробовать РОСУ в качестве перехода на отечественное По. Решили начать с РОСА FRESH R9 — последняя версия на момент установки.

Проблема — все ставил из стандартных репозиториев, но проблема, имевшая место быть и в других дистрибутивах всплыла и тут — при открытии печатной формы (любой) и нажатии по ней мышкой программа падает с ошибкой.

Скриншот во вложении.

В deb дистрибутивах такое лечилось LD_PRELOAD=libgomp.so.1 перед ярлыком и создание симлинка. Тут это не помогло. :(
Гугление дало информацию:

Наименование библиотек пакета libMagickWand изменилось в 2013 году начиная с версии 6.8

libWand.so это старое название библиотеки

В общем сейчас я:

  • снес встроенный imageMagick 7 (вылезла толпа зависимостей от CUPS — наверно печать помрет)
    подключил репозиторий 2012lts main
    поставил imageMagick 6-7

Форма падать перестала.

Вопрос — Есть ли какой то другой вариант заставить работать 1С с версией из стандартного репозитория? Просто надеялся если это Российско-ориентированный дистрибутив, то такие вопросы будут решены заранее.

Или подскажите — может кто-то по другому решал подобные проблемы? Не будет ли таких ошибок на платной версии дистрибутива ?

Не знаю что делать, команда

convert -resize 500 -quality 100 X:1232Новая папка.jpg X:1232Новая папка.JPG

Выполняется в

ShellExecute(Handle, nil, 'cmd.exe', PChar('/K '+ ('convert -resize 500 -quality 100 X:1232Новая папка.jpg X:1232Новая папка.JPG') ), nil, SW_SHOW);

пишет ошибку в CMD
image
Выполняя напрямую в CMD эту команду вылетает та же ошибка, подскажите куда копать((

Понравилась статья? Поделить с друзьями:
  • Ошибка при выполнении операции над данными 22003
  • Ошибка при выполнении операции с информационной базой postgresql
  • Ошибка при выполнении обработчика при вызове контекста
  • Ошибка при выполнении операции корректировка стоимости номенклатуры
  • Ошибка при выполнении операции с информационной базой ole db