Error while writing to output stream dia

Диаграмма Dia

 

Диаграмма Dia

Сообщение06.06.2014, 07:37 


17/11/13
24

Как напечатать диаграммы dia на листы формата А4?

Профиль  

Aritaborian 

Re: Диаграмма Dia

Сообщение06.06.2014, 16:02 

Аватара пользователя


11/06/12
10293
стихия.вздох.мюсли

Экспортируйте документ в ПДФ: меню Файл$to$Экспорт, внизу в выпадающем списке выберите PDF. Далее откройте получившийся ПДФ-файл и печатайте.
Странно, что печать из самой Dia так глючит.

Профиль  

Fantasia 

Re: Диаграмма Dia

Сообщение06.06.2014, 16:31 


17/11/13
24

Не получается экспортировать. Выдает ошибку: error while writing to output stream

Профиль  

Aritaborian 

Re: Диаграмма Dia

Сообщение06.06.2014, 20:50 

Аватара пользователя


11/06/12
10293
стихия.вздох.мюсли

Странно. Какой именно версией вы пользуетесь и под какой системой? У меня Dia 0.97.2 и Win7x32.

Профиль  

Fantasia 

Re: Диаграмма Dia

Сообщение06.06.2014, 20:52 


17/11/13
24

Профиль  

Aritaborian 

Re: Диаграмма Dia

Сообщение06.06.2014, 21:14 

Аватара пользователя


11/06/12
10293
стихия.вздох.мюсли

Нарисовал сейчас левой ногой несколько фигур, экспортировал в ПДФ, всё окей.
Ловите файл и попробуйте сделать с ним то же самое.

Профиль  

Fantasia 

Re: Диаграмма Dia

Сообщение07.06.2014, 07:12 


17/11/13
24

Получается та же самая ошибка.

Профиль  

Aritaborian 

Re: Диаграмма Dia

Сообщение07.06.2014, 17:13 

Аватара пользователя


11/06/12
10293
стихия.вздох.мюсли

Попробуйте, что ли, переустановить программу. Иногда такое помогает.

Профиль  

Aritaborian 

Re: Диаграмма Dia

Сообщение08.06.2014, 17:16 

Аватара пользователя


11/06/12
10293
стихия.вздох.мюсли

А ларчик просто открывался. Не нужно никуда экспортировать. В меню File$to$Page Setup выбираем Paper Size: A4, в разделе Scaling отмечаем Fit to:, выставляем 1 by 1.

Профиль  

Fantasia 

Re: Диаграмма Dia

Сообщение09.06.2014, 11:51 


17/11/13
24

У меня программа на русском языке.

Профиль  

Aritaborian 

Re: Диаграмма Dia

Сообщение09.06.2014, 12:01 

Аватара пользователя


11/06/12
10293
стихия.вздох.мюсли

Ну вы прямо как мой племянник-второклашка, ей-богу. Ему простительно незнание английского, а вам? Впрочем, у каждого свои недостатки.
Перевожу на русский. В меню Файл$to$Настройка страницы выбираем размер бумаги A4, в разделе «Масштабирование» выбираем «Заполнять по:» и выставляем 1 и 1. Жмём «Окей».

Профиль  

Fantasia 

Re: Диаграмма Dia

Сообщение09.06.2014, 20:20 


17/11/13
24

Все равно они не печатались в А4. Но проблема уже решена.

Профиль  

Модераторы: Karan, Toucan, PAV, maxal, Супермодераторы

Содержание

  1. gnuplot Bugs
  2. A portable, multi-platform, command-line driven graphing utility
  3. Priority
  4. Searches
  5. #1621 save as pdf in wxt terminal
  6. Discussion
  7. have’ Error writing to output stream. ‘ when I use HPC, how to fix this?
  8. Direct link to this question
  9. Direct link to this question
  10. Direct link to this comment
  11. Direct link to this comment
  12. Accepted Answer
  13. Direct link to this answer
  14. Direct link to this answer
  15. More Answers (0)
  16. See Also
  17. Categories
  18. Community Treasure Hunt
  19. How to Get Best Site Performance
  20. Americas
  21. Europe
  22. Asia Pacific
  23. Configure runbook output and message streams
  24. Use the output stream
  25. Handle output from a function
  26. Declare output data type
  27. Declare output data type in a workflow
  28. Declare output data type in a graphical runbook
  29. Working with message streams
  30. Write output to warning and error streams
  31. Write output to debug stream
  32. Examples
  33. Write output to verbose stream
  34. Handle progress records
  35. Work with preference variables
  36. Retrieve runbook output and messages
  37. Retrieve runbook output and messages in Azure portal
  38. Retrieve runbook output and messages in Windows PowerShell
  39. Retrieve runbook output and messages in graphical runbooks
  40. Retrieve runbook output and messages in Microsoft Azure Monitor logs

gnuplot Bugs

A portable, multi-platform, command-line driven graphing utility

Priority

Searches

#1621 save as pdf in wxt terminal

the «save as» dialog in the wxt terminal crashes over saving a pdf if the existing file is open in e.g. the adobe reader. wgnuplot.exe then silently quits.

The windows console version says

Discussion

Update: Same on unix, but that’s hardly a problem because most pdf readers there don’t block the file.

Saving as png also crashes if an existing file cannot be overwritten.

Just getting around to looking at this now. Can you clarify the conditions under which you see a problem on unix? Is that specifically some OS other than linux? On linux I get a warning «error writing PNG file: error while writing to output stream» but nothing untoward after that. Certainly no crash.

Note that I have seen another problem that conceivably is somehow related. If for some reason the file dialog tries to access gvfs unsuccessfully, gnuplot can hang. Why would it do that? No idea. I «solved» it by uninstalling gvfs, but I suppose somebody uses it for something so that isn’t a general solution. See bug #1513.

Saving as pdf under linux crashes e.g. if the user only has «read» privilege on the existing file.

For save as png i cannot reproduce the crash any more on linux or windows, but the errormessage you cite is displayed instead. I don’t remember what exactly i tried last time.

No crash here if I try to write on top of a read-only pdf file. Just an error message
«Cairo is unhappy: error while writing to output stream»

Anyhow, since this all happens inside a library-provided file chooser I don’t think it is something we can change. It is in principle possible to provide a custom-written file chooser, but that would be a major headache to implement.

So that basically is (or perhaps was?) a bug in wxt then, right?

  • labels: wxt, Windows —> wxt
  • status: open —> open-works-for-me
  • Group: —>
  • Priority: —>

Using version 5.0.4 on Windows now only gives a warning dialog which states that the file e.g. is write-protected and asks the user to choose another filename.

To me it looks like this was an error in one of the libraries (wxWidgets?).

Saving to a file that is write-protected gives an error message and asks for a new file name, but if the .pdf in not protected but simply open in Acrobat Reader, gnuplot still silently crashes on my machine. (win7/gp5.0pl4_64bit official binary)

OK. We really need to check the cairo status when creating the surface. The attached patch does that for the PDF and SVG code paths. The PNG code has an equivalent test already.
Interestingly, testing with access(. W_OK) does not work.

Источник

have’ Error writing to output stream. ‘ when I use HPC, how to fix this?

Direct link to this question

Direct link to this question

1 Comment

Accepted Answer

Direct link to this answer

Direct link to this answer

0 Comments

More Answers (0)

See Also

Categories

Find the treasures in MATLAB Central and discover how the community can help you!

An Error Occurred

Unable to complete the action because of changes made to the page. Reload the page to see its updated state.

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文 Chinese
    • English
  • 日本 Japanese (日本語)
  • 한국 Korean (한국어)

Accelerating the pace of engineering and science

MathWorks is the leading developer of mathematical computing software for engineers and scientists.

Источник

Configure runbook output and message streams

Most Azure Automation runbooks have some form of output. This output can be an error message to the user or a complex object intended to be used with another runbook. Windows PowerShell provides multiple streams to send output from a script or workflow. Azure Automation works with each of these streams differently. You should follow best practices for using the streams when you’re creating a runbook.

The following table briefly describes each stream with its behavior in the Azure portal for published runbooks and during testing of a runbook. The output stream is the main stream used for communication between runbooks. The other streams are classified as message streams, intended to communicate information to the user.

Stream Description Published Test
Error Error message intended for the user. Unlike with an exception, the runbook continues after an error message by default. Written to job history Displayed in Test output pane
Debug Messages intended for an interactive user. Shouldn’t be used in runbooks. Not written to job history Not displayed in Test output pane
Output Objects intended to be consumed by other runbooks. Written to job history Displayed in Test output pane
Progress Records automatically generated before and after each activity in the runbook. The runbook shouldn’t try to create its own progress records, since they’re intended for an interactive user. Written to job history only if progress logging is turned on for the runbook Not displayed in Test output pane
Verbose Messages that give general or debugging information. Written to job history only if verbose logging is turned on for the runbook Displayed in Test output pane only if VerbosePreference variable is set to Continue in runbook
Warning Warning message intended for the user. Written to job history Displayed in Test output pane

Use the output stream

The output stream is used for the output of objects created by a script or workflow when it runs correctly. Azure Automation primarily uses this stream for objects to be consumed by parent runbooks that call the current runbook. When a parent calls a runbook inline, the child returns data from the output stream to the parent.

Your runbook uses the output stream to communicate general information to the client only if it is never called by another runbook. As a best practice, however, you runbooks should typically use the verbose stream to communicate general information to the user.

Have your runbook write data to the output stream using Write-Output. Alternatively, you can put the object on its own line in the script.

Handle output from a function

When a runbook function writes to the output stream, the output is passed back to the runbook. If the runbook assigns that output to a variable, the output is not written to the output stream. Writing to any other streams from within the function writes to the corresponding stream for the runbook. Consider the following sample PowerShell Workflow runbook.

The output stream for the runbook job is:

The verbose stream for the runbook job is:

Once you’ve published the runbook and before you start it, you must also turn on verbose logging in the runbook settings to get the verbose stream output.

Declare output data type

The following are examples of output data types:

  • System.String
  • System.Int32
  • System.Collections.Hashtable
  • Microsoft.Azure.Commands.Compute.Models.PSVirtualMachine

Declare output data type in a workflow

A workflow specifies the data type of its output using the OutputType attribute. This attribute has no effect during runtime, but it provides you an indication at design time of the expected output of the runbook. As the tool set for runbooks continues to evolve, the importance of declaring output data types at design time increases. Therefore it’s a best practice to include this declaration in any runbooks that you create.

The following sample runbook outputs a string object and includes a declaration of its output type. If your runbook outputs an array of a certain type, then you should still specify the type as opposed to an array of the type.

Declare output data type in a graphical runbook

To declare an output type in a graphical or graphical PowerShell Workflow runbook, you can select the Input and Output menu option and enter the output type. It’s recommended to use the full .NET class name to make the type easily identifiable when a parent runbook references it. Using the full name exposes all the properties of the class to the databus in the runbook and increases flexibility when the properties are used for conditional logic, logging, and referencing as values for other runbook activities.

After you enter a value in the Output Type field in the Input and Output properties pane, be sure to click outside the control so that it recognizes your entry.

The following example shows two graphical runbooks to demonstrate the Input and Output feature. Applying the modular runbook design model, you have one runbook as the Authenticate Runbook template managing authentication with Azure using the Run As account. The second runbook, which normally performs core logic to automate a given scenario, in this case executes the Authenticate Runbook template. It displays the results to your Test output pane. Under normal circumstances, you would have this runbook do something against a resource leveraging the output from the child runbook.

Here is the basic logic of the AuthenticateTo-Azure runbook.
.

The runbook includes the output type Microsoft.Azure.Commands.Profile.Models.PSAzureContext , which returns the authentication profile properties.

While this runbook is straightforward, there is one configuration item to call out here. The last activity executes the Write-Output cmdlet to write profile data to a variable using a PowerShell expression for the Inputobject parameter. This parameter is required for Write-Output .

The second runbook in this example, named Test-ChildOutputType, simply defines two activities.

The first activity calls the AuthenticateTo-Azure runbook. The second activity runs the Write-Verbose cmdlet with Data source set to Activity output. Also, Field path is set to Context.Subscription.SubscriptionName, the context output from the AuthenticateTo-Azure runbook.

The resulting output is the name of the subscription.

Working with message streams

Unlike the output stream, message streams communicate information to the user. There are multiple message streams for different kinds of information, and Azure Automation handles each stream differently.

Write output to warning and error streams

The warning and error streams log problems that occur in a runbook. Azure Automation writes these streams to the job history when executing a runbook. Automation includes the streams in the Test output pane in the Azure portal when a runbook is tested.

By default, a runbook continues to execute after a warning or error. You can specify that your runbook should suspend on a warning or error by having the runbook set a preference variable before creating the message. For example, to cause the runbook to suspend on an error as it does on an exception, set the ErrorActionPreference variable to Stop.

Create a warning or error message using the Write-Warning or Write-Error cmdlet. Activities can also write to the warning and error streams.

Write output to debug stream

Azure Automation uses the debug message stream for interactive users. By default Azure Automation does not capture any debug stream data, only output, error, and warning data are captured as well as verbose data if the runbook is configured to capture it.

In order to capture debug stream data, you have to perform two actions in your runbooks:

Set the variable $GLOBAL:DebugPreference=»Continue» , which tells PowerShell to continue whenever a debug message is encountered. The $GLOBAL: portion tells PowerShell to do this in the global scope rather than whatever local scope the script is in at the time the statement is executed.

Redirect the debug stream that we don’t capture to a stream that we do capture such as output. This is done by setting PowerShell redirection against the statement to be executed. For more information on PowerShell redirection, see About Redirection.

Examples

In this example, the runbook is configured using the Write-Output and Write-Debug cmdlets with the intention of outputting two different streams.

If this runbook were to be executed as is, the output pane for the runbook job would stream the following output:

In this example, the runbook is configured similar to the previous example, except the statement $GLOBAL:DebugPreference=»Continue» is included with the addition of 5>&1 at the end of the Write-Debug statement.

If this runbook were to be executed, the output pane for the runbook job would stream the following output:

This occurs because the $GLOBAL:DebugPreference=»Continue» statement tells PowerShell to display debug messages, and the addition of 5>&1 to the end of the Write-Debug statement tells PowerShell to redirect stream 5 (debug) to stream 1 (output).

Write output to verbose stream

The Verbose message stream supports general information about runbook operation. Since the debug stream is not available for a runbook, your runbook should use verbose messages for debug information.

By default, the job history does not store verbose messages from published runbooks, for performance reasons. To store verbose messages, use the Azure portal Configure tab with the Log Verbose Records setting to configure your published runbooks to log verbose messages. Turn on this option only to troubleshoot or debug a runbook. In most cases, you should keep the default setting of not logging verbose records.

When testing a runbook, verbose messages aren’t displayed even if the runbook is configured to log verbose records. To display verbose messages while testing a runbook, you must set the VerbosePreference variable to Continue. With that variable set, verbose messages are displayed in the Test output pane of the Azure portal.

The following code creates a verbose message using the Write-Verbose cmdlet.

Handle progress records

You can use the Configure tab of the Azure portal to configure a runbook to log progress records. The default setting is to not log the records, to maximize performance. In most cases, you should keep the default setting. Turn on this option only to troubleshoot or debug a runbook.

If you enable progress record logging, your runbook writes a record to job history before and after each activity runs. Testing a runbook does not display progress messages even if the runbook is configured to log progress records.

The Write-Progress cmdlet is not valid in a runbook, since this cmdlet is intended for use with an interactive user.

Work with preference variables

You can set certain Windows PowerShell preference variables in your runbooks to control the response to data sent to different output streams. The following table lists the preference variables that can be used in runbooks, with their default and valid values. Additional values are available for the preference variables when used in Windows PowerShell outside of Azure Automation.

Variable Default Value Valid Values
WarningPreference Continue Stop
Continue
SilentlyContinue
ErrorActionPreference Continue Stop
Continue
SilentlyContinue
VerbosePreference SilentlyContinue Stop
Continue
SilentlyContinue

The next table lists the behavior for the preference variable values that are valid in runbooks.

Value Behavior
Continue Logs the message and continues executing the runbook.
SilentlyContinue Continues executing the runbook without logging the message. This value has the effect of ignoring the message.
Stop Logs the message and suspends the runbook.

Retrieve runbook output and messages

Retrieve runbook output and messages in Azure portal

You can view the details of a runbook job in the Azure portal using the Jobs tab for the runbook. The job summary displays the input parameters and the output stream, in addition to general information about the job and any exceptions that have occurred. The job history includes messages from the output stream and warning and error streams. It also includes messages from the verbose stream and progress records if the runbook is configured to log verbose and progress records.

Job streams for Python runbooks are currently supported for output in the English language.

Retrieve runbook output and messages in Windows PowerShell

In Windows PowerShell, you can retrieve output and messages from a runbook using the Get-AzAutomationJobOutput cmdlet. This cmdlet requires the ID of the job and has a parameter called Stream in which to specify the stream to retrieve. You can specify a value of Any for this parameter to retrieve all streams for the job.

The following example starts a sample runbook and then waits for it to complete. Once the runbook completes execution, the script collects the runbook output stream from the job.

Retrieve runbook output and messages in graphical runbooks

For graphical runbooks, extra logging of output and messages is available in the form of activity-level tracing. There are two levels of tracing: Basic and Detailed. Basic tracing displays the start and end time for each activity in the runbook, plus information related to any activity retries. Some examples are the number of attempts and the start time of the activity. Detailed tracing includes basic tracing features plus logging of input and output data for each activity.

Currently activity-level tracing writes records using the verbose stream. Therefore you must enable verbose logging when you enable tracing. For graphical runbooks with tracing enabled, there’s no need to log progress records. Basic tracing serves the same purpose and is more informative.

You can see from the image that enabling verbose logging and tracing for graphical runbooks makes much more information available in the production Job Streams view. This extra information can be essential for troubleshooting production problems with a runbook.

However, unless you require this information to track the progress of a runbook for troubleshooting, you might want to keep tracing turned off as a general practice. The trace records can be especially numerous. With graphical runbook tracing, you can get two to four records per activity, depending on your configuration of Basic or Detailed tracing.

To enable activity-level tracing:

In the Azure portal, open your Automation account.

Select Runbooks under Process Automation to open the list of runbooks.

On the Runbooks page, select a graphical runbook from your list of runbooks.

Under Settings, click Logging and tracing.

On the Logging and Tracing page, under Log verbose records, click On to enable verbose logging.

Under Activity-level tracing, change the trace level to Basic or Detailed, based on the level of tracing you require.

Retrieve runbook output and messages in Microsoft Azure Monitor logs

Azure Automation can send runbook job status and job streams to your Log Analytics workspace. Azure Monitor supports logs that allow you to:

  • Get insight on your Automation jobs.
  • Trigger an email or alert based on your runbook job status, for example, Failed or Suspended.
  • Write advanced queries across job streams.
  • Correlate jobs across Automation accounts.
  • Visualize job history.

For more information about configuring integration with Azure Monitor Logs to collect, correlate, and act on job data, see Forward job status and job streams from Automation to Azure Monitor Logs.

Источник

Hi,

I updated some things recently and now I get this error (this is a project I dip into occasionally):

Loading SVG(s) <===========================================> 100% Time: 00:00:00
Loading SVG(s) <===========================================> 100% Time: 00:00:00
Loading SVG(s) <===========================================> 100% Time: 00:00:00
rake aborted!
Cairo::WriteError: error while writing to output stream
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/squib-0.13.4/lib/squib/graphics/save_pdf.rb:60:in `initialize'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/squib-0.13.4/lib/squib/graphics/save_pdf.rb:60:in `new'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/squib-0.13.4/lib/squib/graphics/save_pdf.rb:60:in `init_cc'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/squib-0.13.4/lib/squib/graphics/save_pdf.rb:14:in `render_pdf'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/squib-0.13.4/lib/squib/api/save.rb:22:in `save_pdf'
C:/Users/John/Documents/valar/rb/kingdom.rb:39:in `block in make_kingdom_deck'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/squib-0.13.4/lib/squib/deck.rb:74:in `instance_eval'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/squib-0.13.4/lib/squib/deck.rb:74:in `initialize'
C:/Users/John/Documents/valar/rb/kingdom.rb:4:in `new'
C:/Users/John/Documents/valar/rb/kingdom.rb:4:in `make_kingdom_deck'
C:/Users/John/Documents/valar/Rakefile:10:in `block in <top (required)>'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/task.rb:251:in `block in execute'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/task.rb:251:in `each'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/task.rb:251:in `execute'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
C:/tools/ruby24/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/task.rb:217:in `block in invoke_prerequisites'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/task.rb:215:in `each'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/task.rb:215:in `invoke_prerequisites'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
C:/tools/ruby24/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/task.rb:181:in `invoke'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/application.rb:153:in `invoke_task'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/application.rb:109:in `block (2 levels) in top_level'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/application.rb:109:in `each'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/application.rb:109:in `block in top_level'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/application.rb:118:in `run_with_threads'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/application.rb:103:in `top_level'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/application.rb:81:in `block in run'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/application.rb:179:in `standard_exception_handling'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/lib/rake/application.rb:78:in `run'
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/rake-12.1.0/exe/rake:27:in `<top (required)>'
C:/tools/ruby24/bin/rake:23:in `load'
C:/tools/ruby24/bin/rake:23:in `<main>'
Tasks: TOP => default => spells

This is how I am compiling:

def make_kingdom_deck (prefix, deck, layout)
  Squib::Deck.new(cards: deck['Title'].size, layout: layout, width: 816, height: 1110) do
    background color: 'white'

    png file: deck['Art'], layout: :Art

    png file: 'wip/panel.png'
    png file: 'wip/bg-textile.png', blend: :soft_light

    text str: deck['Title'], layout: :Title
    text str: deck['Keywords'], layout: :Keywords


    text str: deck['Effect 1 title'], layout: :Effect1Title
    text str: deck['Effect 1 description'], layout: :Effect1Desc do |ctx|  
      ctx.svg key: ':gold:', file: "images/icons/coin.svg", layout: :CoinIcon
      ctx.png key: ':mana:', file: "images/icons/mana-mandatory.png", layout: :CoinIcon
    end

    text str: deck['Effect 2 title'], layout: :Effect2Title
    text str: deck['Effect 2 description'], layout: :Effect2Desc do |ctx|  
      ctx.svg key: ':gold:', file: "images/icons/coin.svg", layout: :CoinIcon
      ctx.png key: ':mana:', file: "images/icons/mana-mandatory.png", layout: :CoinIcon
    end

    svg file: 'icons/attack.svg', layout: :AttackIcon
    text str: deck['Attack'], layout: :AttackText

    svg file: 'icons/defend.svg', layout: :DefendIcon
    text str: deck['Defend'], layout: :DefendText

    svg file: 'icons/coin.svg', layout: :CoinIcon
    text str: deck['Gold Cost'], layout: :CoinText
    

    save_png prefix: prefix
    save_pdf trim: 36, file: prefix + ".pdf" #, gap: 10
  end
end

I commented out the save_png call to see if the save_pdf call worked, and it also failed in the same way.

This is called like this:

file :spells => ["Rakefile", "layouts/spells.yml", "rb/kingdom.rb", "decks/kingdom/spells.csv"] do
  spells = Squib.csv file: 'decks/kingdom/spells.csv'
  make_kingdom_deck 'spell_', spells, "layouts/spells.yml"
end

Versions:

Ruby version: ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]
Gem list:


*** LOCAL GEMS ***

bigdecimal (1.3.2, default: 1.3.0)
cairo (1.15.9 x64-mingw32)
cairo-gobject (3.1.8 x64-mingw32)
did_you_mean (1.1.2, 1.1.0)
gdk_pixbuf2 (3.1.8 x64-mingw32)
gio2 (3.1.8 x64-mingw32)
glib2 (3.1.8 x64-mingw32)
gobject-introspection (3.1.8 x64-mingw32)
io-console (default: 0.4.6)
json (2.1.0, default: 2.0.4)
mercenary (0.3.6)
mini_portile2 (2.2.0)
minitest (5.10.3, 5.10.1)
native-package-installer (1.0.4)
net-telnet (0.1.1)
nokogiri (1.8.0 x64-mingw32)
openssl (2.0.6, default: 2.0.5)
pango (3.1.8 x64-mingw32)
pkg-config (1.2.7)
power_assert (1.1.0, 0.4.1)
psych (2.2.4, default: 2.2.2)
rake (12.1.0, 12.0.0)
rdoc (5.1.0, default: 5.0.0)
roo (2.7.1)
rsvg2 (3.1.8 x64-mingw32)
ruby-progressbar (1.8.1)
rubyzip (1.2.1)
squib (0.13.4)
test-unit (3.2.6, 3.2.3)
xmlrpc (0.3.0, 0.2.1)

gemfile:

source 'https://rubygems.org'

gem 'squib'

gem 'guard'      # guard is what watches
gem 'guard-rake' # this hooks Guard into Rake
gem 'wdm', '>= 0.1.0' if Gem.win_platform? # optional, for watching directories
gem 'cairo'

The _output directory exists and can be written to. I am on Windows 10 x64 (I know, boo hiss and all that). I typically use PowerShell or VS Code’s tasks, but this also happens from a cmd prompt as well.

If this is a case of something like cairo being updated in a breaking way, can you let me know what versions I need to specify in my gemfile?

Many thanks

Hi,

I am trying to submit soap message along with pdf file as an attachment, but as soon i invokde webservice URL i am getting below Exception.

2014-02-28 13:10:29,513 FATAL [NP_MITS_AL] KA201402281310261800717|24954|CK0005054|PortRequest : MitsWSAxis2Client : send

org.apache.axiom.om.OMException: Error while writing to the OutputStream.

at org.apache.axiom.om.impl.MIMEOutputUtils.complete(MIMEOutputUtils.java:202)

at org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWriter.java:184)

at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:487)

at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)

at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)

at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(Unknown Source)

at org.apache.commons.httpclient.HttpMethodBase.writeRequest(Unknown Source)

at org.apache.commons.httpclient.HttpMethodBase.execute(Unknown Source)

at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)

at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)

at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)

at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)

at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)

at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)

at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)

at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)

at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)

at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)

at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)

at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)

at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)

Caused by: java.net.SocketException: Connection reset

at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96)

at java.net.SocketOutputStream.write(SocketOutputStream.java:136)

at com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:295)

at com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:284)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:727)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:715)

at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)

at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)

at org.apache.commons.httpclient.ChunkedOutputStream.flushCacheWithAppend(Unknown Source)

at org.apache.commons.httpclient.ChunkedOutputStream.write(Unknown Source)

at javax.activation.DataHandler.writeTo(DataHandler.java:308)

at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1350)

at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:845)

at org.apache.axiom.om.impl.MIMEOutputUtils.writeBodyPart(MIMEOutputUtils.java:317)

at org.apache.axiom.om.impl.MIMEOutputUtils.complete(MIMEOutputUtils.java:192)

Regards,

Jay

CAIRO_STATUS_SUCCESS

no error has occurred (Since 1.0)

 

CAIRO_STATUS_NO_MEMORY

out of memory (Since 1.0)

 

CAIRO_STATUS_INVALID_RESTORE

cairo_restore() called without matching cairo_save() (Since 1.0)

 

CAIRO_STATUS_INVALID_POP_GROUP

no saved group to pop, i.e. cairo_pop_group() without matching cairo_push_group() (Since 1.0)

 

CAIRO_STATUS_NO_CURRENT_POINT

no current point defined (Since 1.0)

 

CAIRO_STATUS_INVALID_MATRIX

invalid matrix (not invertible) (Since 1.0)

 

CAIRO_STATUS_INVALID_STATUS

invalid value for an input cairo_status_t (Since 1.0)

 

CAIRO_STATUS_NULL_POINTER

NULL pointer (Since 1.0)

 

CAIRO_STATUS_INVALID_STRING

input string not valid UTF-8 (Since 1.0)

 

CAIRO_STATUS_INVALID_PATH_DATA

input path data not valid (Since 1.0)

 

CAIRO_STATUS_READ_ERROR

error while reading from input stream (Since 1.0)

 

CAIRO_STATUS_WRITE_ERROR

error while writing to output stream (Since 1.0)

 

CAIRO_STATUS_SURFACE_FINISHED

target surface has been finished (Since 1.0)

 

CAIRO_STATUS_SURFACE_TYPE_MISMATCH

the surface type is not appropriate for the operation (Since 1.0)

 

CAIRO_STATUS_PATTERN_TYPE_MISMATCH

the pattern type is not appropriate for the operation (Since 1.0)

 

CAIRO_STATUS_INVALID_CONTENT

invalid value for an input cairo_content_t (Since 1.0)

 

CAIRO_STATUS_INVALID_FORMAT

invalid value for an input cairo_format_t (Since 1.0)

 

CAIRO_STATUS_INVALID_VISUAL

invalid value for an input Visual* (Since 1.0)

 

CAIRO_STATUS_FILE_NOT_FOUND

file not found (Since 1.0)

 

CAIRO_STATUS_INVALID_DASH

invalid value for a dash setting (Since 1.0)

 

CAIRO_STATUS_INVALID_DSC_COMMENT

invalid value for a DSC comment (Since 1.2)

 

CAIRO_STATUS_INVALID_INDEX

invalid index passed to getter (Since 1.4)

 

CAIRO_STATUS_CLIP_NOT_REPRESENTABLE

clip region not representable in desired format (Since 1.4)

 

CAIRO_STATUS_TEMP_FILE_ERROR

error creating or writing to a temporary file (Since 1.6)

 

CAIRO_STATUS_INVALID_STRIDE

invalid value for stride (Since 1.6)

 

CAIRO_STATUS_FONT_TYPE_MISMATCH

the font type is not appropriate for the operation (Since 1.8)

 

CAIRO_STATUS_USER_FONT_IMMUTABLE

the user-font is immutable (Since 1.8)

 

CAIRO_STATUS_USER_FONT_ERROR

error occurred in a user-font callback function (Since 1.8)

 

CAIRO_STATUS_NEGATIVE_COUNT

negative number used where it is not allowed (Since 1.8)

 

CAIRO_STATUS_INVALID_CLUSTERS

input clusters do not represent the accompanying text and glyph array (Since 1.8)

 

CAIRO_STATUS_INVALID_SLANT

invalid value for an input cairo_font_slant_t (Since 1.8)

 

CAIRO_STATUS_INVALID_WEIGHT

invalid value for an input cairo_font_weight_t (Since 1.8)

 

CAIRO_STATUS_INVALID_SIZE

invalid value (typically too big) for the size of the input (surface, pattern, etc.) (Since 1.10)

 

CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED

user-font method not implemented (Since 1.10)

 

CAIRO_STATUS_DEVICE_TYPE_MISMATCH

the device type is not appropriate for the operation (Since 1.10)

 

CAIRO_STATUS_DEVICE_ERROR

an operation to the device caused an unspecified error (Since 1.10)

 

CAIRO_STATUS_INVALID_MESH_CONSTRUCTION

a mesh pattern
construction operation was used outside of a
cairo_mesh_pattern_begin_patch()/cairo_mesh_pattern_end_patch()
pair (Since 1.12)

 

CAIRO_STATUS_DEVICE_FINISHED

target device has been finished (Since 1.12)

 

CAIRO_STATUS_JBIG2_GLOBAL_MISSING

CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID has been used on at least one image
but no image provided CAIRO_MIME_TYPE_JBIG2_GLOBAL (Since 1.14)

 

CAIRO_STATUS_PNG_ERROR

error occurred in libpng while reading from or writing to a PNG file (Since 1.16)

 

CAIRO_STATUS_FREETYPE_ERROR

error occurred in libfreetype (Since 1.16)

 

CAIRO_STATUS_WIN32_GDI_ERROR

error occurred in the Windows Graphics Device Interface (Since 1.16)

 

CAIRO_STATUS_TAG_ERROR

invalid tag name, attributes, or nesting (Since 1.16)

 

CAIRO_STATUS_LAST_STATUS

this is a special value indicating the number of
status values defined in this enumeration. When using this value, note
that the version of cairo at run-time may have additional status values
defined than the value of this symbol at compile-time. (Since 1.10)

 

Понравилась статья? Поделить с друзьями:
  • Error while waiting for device retry after fixing problem by hand
  • Error while waiting for device could not start avd что делать
  • Error while waiting for device could not start avd ошибка
  • Error while waiting for device could not start avd android studio
  • Error writing partition failed remote critical partition flashing is not allowed