Tracing: Track each case label separately

In the following code example:
switch(var)
case 1:
case 2:

the counting for case 2 is wrong as it is the sum of case 1 and 2.
To fix that one can think about something like:

// Z::ll: Only count line number if true
Function Dostuff()
	variable var
	string str

	switch(var++) // TODO
		case 1:
			Z_(0, 0, ll=(1==(var)))
		case 2:
			Z_(0, 0, ll=(2==var))
	endswitch

	strswitch(str)
		case "a":
			Z_(0, 0, ll=(!CmpStr((str), "a")))
		case "b":
			Z_(0, 0, ll=(!CmpStr((str), "b")))
	endswitch
End

but that will give wrong results if the switch expression is not idempotent. A solution for that would be to have a Z_ function in the switch statement, such that the expression is only executed once. Since Z_ needs to know now the target line where the case x: in question is in the source, we need to gather that information beforehand on instrumentation.
Then we can look the line numbers up on actual execution of Z_. This will be slow.

I propose the following solution. This includes several steps, waves and functions that have to be introduced.
Instrumentation
During the instrumentation step we are counting each switch statement and assign each of them a unique id (must be unique during the full instrumentation run). For each switch statement we search for the corresponding endswitch statement (be careful that switch statements can be nested!). Between the switch statement and the endswitch statements are all case statement tagged with a reference number that is only valid for the current switch scope. Only case statements that are directly associated with the switch statement and not nested switch statement can be tagged!
This tagging and unique id information has to be stored for later usage because the analytics in a later stage needs them.
Inside the switch call is a new Z_ like function added ZS_ which receives the switch-ID and the argument of the switch statement as optional argument. After the endswitch is a call to ZS_ introduced without any optional arguments.
After each case statement is a call ZC_ introduced which receive the current switch-ID and the case number.
For example, we have this Igor code:
switch(SomeArguments())
    case 1:
    case 2:
        print "Hello"
        break
    case 3:
        print "Hi"
        break
endswitch

After instrumentation we have this code (without the usual Z_ calls):
switch(ZS_(1337, v=SomeArguments()))
    case 1:
        ZC_(1337, 0)
    case 2:
        ZC_(1337, 1)
        print "Hello"
        break
    case 3:
        ZC_(1337, 2)
        print "Hi"
        break
endswitch
ZS_(1337)

This has to be repeated for each nested switch statement.
The ZS_ function
This function activates the current switch statement given by the provided switch-ID. This activation is only done for the current thread. If this function is called without any optional argument the given switch statement is deactivated.
The return of the ZS_ function is the same as provided by the optional parameter v.
For strswitch is another function ZSS_ introduced.
The ZC_ function
This function increments the case counter given by the switch-ID and case-index. This is only done if the switch-Statement is activated. After incrementing the switch is deactivated again.
The counter for each switch case is stored as a wave reference wave. The outside wave has as many elements as switch statements exists. For each switch statement is another wave created which has as many elements as case statement inside the switch.
Considerations

Each switch is only activated by test code and disabled right after it. There is no user code in between!
There can be no more than one switch statement activated for each thread.

Data
We need to store the following data:

A table of all switch statements with: switch-ID, line number, procedure file, number of cases
line number of each case for each switch statement
active switch-ID for each thread
case counter for each thread, needs to be merged after execution


fix multiple PIs . #80

Actually, maybe it'd be better for each building to have an array of array of income.
For example, PI is now: income: ["+4pw", "+t"], it would become income: [["+4pw", "+t"]].
The same woud be done for every building. For example, for mines:
income: [["+o"], ["+o"], [], ["+o"], ["+o"], ["+o"], ["+o"], ["+o"]].
That way, there's no Planetary Institute specific code for loading rewards. All buildings load rewards the same way.
The main reason is this though, research labs (and academies) can be done this way:
[Building.ResearchLab]: {
    cost: "5c,3o",
    income: [["+k", "tech"], ["+k", "tech"], ["+k", "tech"]]
  },

And the code in engine.ts:
  // Gain tech tile if lab / academy
        if ( building === Building.ResearchLab || building === Building.Academy1 || building === Building.Academy2) {
          this.subPhase = SubPhase.ChooseTechTile;
          return;
        }

Can be removed.

I can work on this. In the meantime please merge this PR, as this is also in Ambas.


Update naming

Pull Request Test Coverage Report for Build 317

2 of 2 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 314:
0.0%

Covered Lines:
449

Relevant Lines:
449

💛  - Coveralls


Unable to create RKE cluster on Azure

Rancher versions:
rancher/rancher:stable
Infrastructure Stack versions:
kubernetes (if applicable): 1.10.1-rancher1
**Type/provider of hosts: RKE on Azure **
**Setup details: single node rancher **
Environment Template: (Cattle/Kubernetes/Swarm/Mesos)
Steps to Reproduce:
Deploy a new cluster and choose "Azure" as the provider.
Select Cloud provider as "Azure" under Cluster Options.
Results:
Machines in Azure get created
Cluster stuck in "Provisioning" state.
Cluster provisioning cycles through its healthchecks, but fails at:
[controlPlane] Failed to bring up Control Plane: Failed to verify healthcheck: Failed to check https://localhost:6443/healthz for service [kube-apiserver] on host [hostiphere]: Get https://localhost:6443/healthz: can not build dialer to c-rzh2m:m-x9sxp

The message can not build dialer usually means the created host is not able to reach the configured server-url in Rancher. Can you verify it is reachable for the host created?

the URL is a publicly facing URL so it should be contactable yep

actually this may be a firewall restriction. What port is it trying to communicate over?

The launched rancher/rancher-agent will contact Rancher on the configured server-url which can be found in Settings or in the API `/v3/

Added an any/any rule for the 3 IP's of the nodes and still got the same
error. The URL is correct
On Tue, 15 May 2018 at 12:16, Sebastiaan van Steenis <
<EMAIL_ADDRESS>wrote:

The launched rancher/rancher-agent will contact Rancher on the configured
server-url which can be found in Settings or in the API `/v3/
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rancher/rancher/issues/13500#issuecomment-389130875,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKSpXPk0xZqMyDX-gA-3R19sNd4d8h2Dks5tyrj-gaJpZM4T_Slz
.

Okay, if network is all taken care of, is the configuration of the cloud provider done according to the docs: https://rancher.com/docs/rancher/v2.x/en/concepts/clusters/cloud-providers/#azure
Easiest way to test is to not enable Cloud Provider functionality in Kubernetes for now.

Just ran some more tests, can only conclude network configuration. I get other errors when cloud provider is configured incorrectly. Is the server-url directly to the rancher/rancher container or is there something in between? Does the host running rancher/rancher have a static IP that needs additional firewall rules?

Will check and let you know
On Tue, 15 May 2018 at 12:48, Sebastiaan van Steenis <
<EMAIL_ADDRESS>wrote:

Just ran some more tests, can only conclude network configuration. I get
other errors when cloud provider is configured incorrectly. Is the
server-url directly to the rancher/rancher container or is there
something in between? Does the host running rancher/rancher have a static
IP that needs additional firewall rules?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rancher/rancher/issues/13500#issuecomment-389138344,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKSpXKVd3BpuLV8Rc98Yv9q-3BPl9qfPks5tysCFgaJpZM4T_Slz
.

Couldn't get it working at all so i've abandoned rancher.
Publishing directly into kubernetes works perfectly on an AKS cluster created through the portal.

Ok let me know if you need help


Add FAQ item for non-english players

If I read this correctly, someone playing in (say) French would get a Vic2 mod that defaults to English. The localisations are there, but the setting is wrong. An update to the FAQ would provide instructions on how to change the setting. Alternately, there may be an easier way to accomplish this.
https://forum.paradoxplaza.com/forum/index.php?threads/eu4-to-vic2-converter-release-thread.973026/page-40#post-23124054
"Hello,
it seems i have an issue this time on the converter :
I used it a lot and stop playing one year ago, i start again this month. So i use the last one (the G version). I play in french (im french myself) in EU4, but the mod i obtain is in english. I'm pretty sure it was in french when i was using it. The problem is that, as the EU4 is in french, the conversion mess with a lot of name of country (the Z/X named country), same type of issue when you do CK2/EU4 with a english CK2 and a french EU4 for an exemple.
Why my converted save is in english ? when what should i do to have it in french ?
Thank you very much,
++
EDIT : I found it !
I suddenly remember what i was doing !
So for people experiencing the same issue :
Go in the mod of the converted save, then in setting.txt, in it there is a language line, language=l_english, change it in what you want (l_french for me). As suspected, it made everything works great (no more X20, Z03...)
See ya !"

I think it might be possible to extract the language used from the save file (I'm sure I've seen a reference to localisation in it at some point) and edit the settings file automatically in the conversion.  Though I suspect this will have similar problems as editing the defines file.

FAQ was updated with 1.0H


0.17.0 win32 NWjs can't not be downloaded.

As title, win32 sdk filename of NWjs version 0.17.0 is nwjs-sdk-v0.17.0-win-x86.zip not nwjs-sdk-v0.17.0-win-ia32.zip. The change cause nw-builder can't find NWjs to download. I don't not this issue should belong to nwjs or nw-builder. Please help deal with this issue.

Related to https://github.com/nwjs/nw.js/issues/5258#issuecomment-244031040
Should be closed now.


jmxtrans stops working right after midnight

I am currently evaluating jmxtrans to monitor Cassandra with an ELK stack. Unfortunately it jmxtrans stops writing statistics right after midnight.
2018-06-01 00:00:37 [jmxtrans-result-8] level com.googlecode.jmxtrans.model.output.GraphiteWriter2 [GraphiteWriter2.java:66] - Query result: Result(attributeName=Value, className=
org.apache.cassandra.metrics.CassandraMetricsRegistry$JmxGauge, objDomain=org.apache.cassandra.metrics, typeName=type=ThreadPools,path=internal,scope=InternalResponseStage,name=Pe
ndingTasks, valuePath=[], value=0, epoch=1527804037750, keyAlias=threadpools_pending_tasks_internal_InternalResponseStage)

2018-06-01 00:00:37 [jmxtrans-result-8] level com.googlecode.jmxtrans.model.output.GraphiteWriter2 [GraphiteWriter2.java:73] - Graphite Message: servers.test-00
1.threadpools_pending_tasks_internal_InternalResponseStage.Value 0<PHONE_NUMBER>

2018-06-01 00:00:38 [Thread-3] level com.googlecode.jmxtrans.JmxTransformer [JmxTransformer.java:490] - Deleted scheduled job: ******:7199-60459269249531944-6898291399 group: ServerJob

...
2018-06-01 00:00:38 [Thread-3] level com.googlecode.jmxtrans.JmxTransformer [JmxTransformer.java:276] - Stopped writer: com.googlecode.jmxtrans.model.output.support.ResultTransfor
merOutputWriter@e79a029 for query: Query(objectName=org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=Sampler,name=PendingTasks, keys=[], attr=[Value], typeNames=[
], resultAlias=threadpools_pending_tasks_internal_Sampler, useObjDomainAsKey=false, allowDottedKeys=false, useAllTypeNames=false, outputWriterInstances=[com.googlecode.jmxtrans.model.output.support.ResultTransformerOutputWriter@e79a029])

2018-06-01 00:00:38 [Thread-3] level com.googlecode.jmxtrans.ConfigurationParser [ConfigurationParser.java:56] - Loaded file: /home/test/jmx-trans/jmxtrans-config.json

2018-06-01 08:00:52 [Thread-2] level org.quartz.core.QuartzScheduler [QuartzScheduler.java:635] - Scheduler ServerScheduler_$_s3751527747617905 shutting down.

after the 00:00:38 line in the logs jmxtrans hangs until restarted

It looks like the config file was changed and that jmxtrans tried to reload it and restart. There is probably a bug in the restart process. To be honest, that part of the code is messy, and there are probably more than one bug... I'll try to find some time to investigate (no promise), but if anyone wants to have a look, the entry point is probably around https://github.com/jmxtrans/jmxtrans/blob/master/jmxtrans-core/src/main/java/com/googlecode/jmxtrans/JmxTransformer.java#L541-L542

Maybe, check if (this.isProcessConfigFile(file)) should be added to fileDeleted method as it's already done in fileAdded and fileModified methods. What do you think?

This one should be now fixed by #731


feat: implement setUpdateCallback(Consumer func) for Watcher interface

Fix: https://github.com/jcasbin/redis-watcher/issues/10

@seriouszyx Maybe you can modify the title? Because it sounds like it implements the WatcherEx interface, but it is not.😆

@tangyang9464 How about this one?

@rongfengliang plz review


raft-engine: remove confusing API cut logs

What is changed and how it works?
Issue Number: Ref #12842
What's Changed:
The API is supposed to be used with `append` but nowhere can we find
the clue. This PR merges `cut_logs` and `append` to reduce confusion
and mistakes.

Check List
Tests

Unit test
Integration test

Release note
None

/merge


feat: determine the activation mechanism for the new node compat layer for wrangler (and non-wrangler) users

As we are gearing up to release the new node compat layer for workers, we need to come up with a activation mechanism that will allow existing users to transition to the new implementation in a smooth way.
@petebacondarwin started an internal document about this: wiki /WX/Configuring+new+Node.js+compatibility

This newly-proposed flag might be useful in figuring out the activation mechanism: https://github.com/cloudflare/workerd/issues/2133


fix: default l2 gas buffer

Temporary workaround of incorrect gas estimation. Also see https://github.com/OffchainLabs/arb-token-bridge/pull/303

@yahgwai I have added the comment, will let you to merge and publish.


[spinel] fix time narrowing conversion

This makes narrowing conversions of time types explicit to fix build errors.

This makes narrowing conversions of time types explicit to fix build errors.

@Moandor-y, thank you for this fix. Our continuous-integration checks typically catch these issues. Can we add a test for this specific scenario?

This makes narrowing conversions of time types explicit to fix build errors.

@Moandor-y, thank you for this fix. Our continuous-integration checks typically catch these issues. Can we add a test for this specific scenario?

This issue only happens when building a 32-bit target with -Wconversion on. Pushed the commit https://github.com/openthread/openthread/pull/4896/commits/2f31e876f22ff130a26e93c4459af756f08eb7a3 to add a build test for this scenario.


Quote is adding on very big string

Hello , i'm using your package for editing po files ,  i'm having some field example:'X' and i'm having very big another field example:'Y' , if i'm editing X field, Y field's messageId is automatically updating and adding some '/' and quotes between the big string .  how can i restrict this ???? can u please help me in this ??
Orginal File Before Edit :

After Edit :

Please check this screenshot , automatically '/' and quote is adding while editing  and also line is breaking and creating a newline..

Closing as duplicated of #83


4070ti有机会训练一下吗

OutOfMemoryError: CUDA out of memory. Tried to allocate 86.00 MiB (GPU 0; 11.73 GiB total capacity; 9.55 GiB already allocated; 43.31 MiB free; 10.58 GiB reserved in total by PyTorch) If reserved memory is >> allocated
memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

11G显存大概能训练opt-2.7b, bloom-3b这种大小的模型，你可以尝试一下。


Not an editor command ":nHead"

I've got the .obsidian.vimrc lines:
nmap [[ :pHead
nmap ]] :nHead

When I type ]], I see:
Not an editor command ":nHead"

This plugin is installed and enabled through Obsidian's settings.  v0.0.1
How would I go about debugging this?

I think this problem stems from Obsidian's code mirror version being updated, and causing the api used to create the commands to now be incorrect.
If you are interesting in solving the issue, I'd most likely look at the Vimrc plugin and see how they changed things with registration of commands, and emulate the changes to this plugin.
If not, I'll see if I can get to this some time soon :)

Revisiting this, is it just me or do any features of this plugin currently work?
Typing :g0 I get:
Not an editor command ":g0

Cheers for the gj and gk mappings - they're super useful!

When this plugin originally was released, commands worked well. However, at the moment, I don't use obsidian anymore, and I don't have enough time to fix this at the time being :(. Huyz has provided a nice reference that could be used to fixup this plugin.

I guess I can take a crack at it

I got most of it to work, but in g0 and gHead don't work because I get goLineLeftSmart is not implemented and goLineRight is not implemented.  I'm not familiar enough with CodeMirror to know why.

@huyz Thanks for giving it a good go with some improvements!  Could they be merged in?

I shouldn't say "most". I only got the [[ and ]] to work.  g0 and gHead are busted.  There's something messed up about Obsidian's CodeMirror and vim.js where versions seem mismatched: there's code that's invoking functions that don't exist in the app but do exist online in published code.
My guess is we'll have to wait for some updates to Obsidian's CodeMirror dependencies.
Anyway, what I've done doesn't help much so I can't merge that in.

The author of the vimrc-support-plugin has added a file with a tutorial on how to achieve this: https://github.com/esm7/obsidian-vimrc-support/blob/master/JsSnippets.md
You need to

Add the file mdHelpers.js to the vault folder
Add the snippet to your vimrc file
Activate "Support JS commands" in the vimrc plugin settings (and update the plugin before if you haven't)
Reload obsidian

FYI I got around the annoying aspect of 1 by just putting it in my .obsidian folder and changing the exmap to /.obsidian/mdHelpers.js.

Also, I've managed to essentially obsolete this plugin by only using the vimrc plugin and using the following as my vimrc:
nmap j gj
nmap k gk
nmap 0 ^
nmap <S-4> :$

set clipboard=unnamed   " using system clipboard

exmap nextHeading jsfile /.obsidian/vimjshelper.js {jumpHeading(true)}
exmap prevHeading jsfile /.obsidian/vimjshelper.js {jumpHeading(false)}
nmap ]] :nextHeading
nmap [[ :prevHeading

The nmap <S-4> :$ was the only way I could essentially force a Shift+4 to remap to just $.

Now if someone could also write a g0 and gHead equivalent using JS snippets, that would be great

I'm not really concerned about getting [[ and ]] to work. I think they're already defined to work like gg and G. I was able to get what I really wanted out of this plugin inside just the vimrc though.
nmap j gj
nmap k gk
vmap j gj
vmap k gk
exmap 0 goLineLeftSmart
exmap $ goLineRight

FWIW it looks like as of today, codemirror-vim now has g0 and g$ implemented, so you can just directly remap your keys to those commands in your .obsidian.vimrc without any exmaps needed (for those, at least).
nnoremap 0 g^
nnoremap $ g$
nnoremap H g^
nnoremap L g$
nnoremap I g^i
nnoremap A g$a

(And goLineLeftSmart is no longer available, it looks like, but shouldn't be needed anymore)

It seems this plugin is mostly obsolete, I don't use Obsidian anymore and haven't for a long time. If you'd like to update the README with more info/context regarding this, it would be more than welcome :)

Hey @hhhapz  :) sure happy to update things here.
I also did a little more digging and was able to get your plugin's implementation of pHead and pNext working with CM6 (just needed to use (window as any).CodeMirrorAdapter?.Vim) instead of CodeMirror.Vim). I figured it could still be nice for people to simply be able to install a plugin and have those commands available, rather than needing to write their own JS snippets and store them in their vaults.
So, your repo may not be obsolete, for that use case. But you don't need to maintain it if you don't want to anymore—we could either:

Add the fixed pHead / pNext functionality to this repo (and could also add other Obsidian-specific vim commands like moveDownSkipFold), and keep this repo active
Deprecate this repo, and I could either maintain a new fork of it, or see if @esm7 wants the commands to be exposed by his obsidian-vimrc-support plugin

Let me know if you'd prefer either one, I'm happy with anything

I'm happy with anything, if you'd like to fork, that's fine with me, if you want commit access here, I'll be happy to give you that too.

Okay cool, it could be simpler to just bring the changes into here, then. Other than I'm not quite sure how the release process works with the official Obsidian plugin directory, but briefly looking into it, it looks like I can maybe just do that through GitHub. Can look more into that when I get a chance :)

Hey @hhhapz :) sure happy to update things here.
I also did a little more digging and was able to get your plugin's implementation of pHead and pNext working with CM6 (just needed to use (window as any).CodeMirrorAdapter?.Vim) instead of CodeMirror.Vim). I figured it could still be nice for people to simply be able to install a plugin and have those commands available, rather than needing to write their own JS snippets and store them in their vaults.
So, your repo may not be obsolete, for that use case. But you don't need to maintain it if you don't want to anymore—we could either:
* Add the fixed `pHead` / `pNext` functionality to this repo (and could also add other Obsidian-specific vim commands like [`moveDownSkipFold`](https://github.com/esm7/obsidian-vimrc-support/blob/master/JsSnippets.md)), and keep this repo active

* Deprecate this repo, and I could either maintain a new fork of it, or see if @esm7 wants the commands to be exposed by his [obsidian-vimrc-support](https://github.com/esm7/obsidian-vimrc-support/) plugin

Let me know if you'd prefer either one, I'm happy with anything

I'm perfectly good with adding these to obsidian-vimrc-support, if you wish. Whatever you think would be better :)

@esm7  Oh nice, yeah if you're happy to do that, I think that'd be best from a user perspective too, just needing to install a single plugin :)

Mind opening a pull request for that? It'll probably take me a couple of weeks to review, as I'll use the opportunity to also review other issues and release an updated version, but we can definitely get it done.

Sorry for the delay here, got busy with some other stuff, but just put up a PR for obsidian-vimrc-support to provide these (and a couple other) motions/commands. If that looks good and gets merged, we can probably go ahead and deprecate this plugin


Fix string escaping

The is a bug in string escaping code.
Reproduction:
fn main() {
    use sqlformat::*;

    let res = format("''some text ending with escaped quote''", &QueryParams::None, FormatOptions::default());
    println!("{res}");
}

prints:
' some text ending with escaped quote ' ''

but should print:
'some text ending with escaped quote'''

It's a small bug in tokenizer::take_till_escaping, which I fixed and added a test to cover this case.

PS: we use this crate at PRQL and this is how we found the bug.


ACL for topic that contains #

Hi,
I'm getting a ParseException when using a topic that contains a # character. Example:
user someUser
topic readwrite mytopic/#

Looking at source in ACLFileParser.java seems obvious what the error is. As it is, if the line contains a # in other position than the beginning  of the line, the ParseException is thrown.
       while ((line = br.readLine()) != null) {
                int commentMarker = line.indexOf('#');
                if (commentMarker != -1) {
                    if (commentMarker == 0) {
                        // skip its a comment
                        continue;
                    } else {
                        // it's a malformed comment
                        throw new ParseException(line, commentMarker);
                    }
                } else {
                    if (line.isEmpty() || line.matches("^\\s*$")) {
                        // skip it's a black line
                        continue;
                    }

                    collector.parse(line);
                }
            }

Fixed by PR #340


Move name/title resource prompt to bottom

Ask for resource name/title after resource settings has been selected.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Migrate KitOps from GitHub pages to some other provider

To improve SEO, indexing, and bot activity we need to migrate kitops.ml off of github pages to cloudflare

Related noted: I had a quick, small talk about it with @gorkem and we might have a few issues that might prevent us from using Cloudflare (but of course, he's the expert, so he has the final saying) but for the sake of keeping the choices open, i have edited the title as we might end up not using Cloudflare but using something else instead.

Here's a list in the official Vitepress documentation about different platforms that we could consider in case Cloudflare is not an option: https://vitepress.dev/guide/deploy#platform-guides

@javisperez I don't think it really matters where we move it to, I was just under the impression that cloudflare was the easiest since we are already using it.

@javisperez I don't think it really matters where we move it to, I was just under the impression that cloudflare was the easiest since we are already using it.

Yes, i just wanted to mention it in the issue for visibility and information.


Go: Broken Generated Code when Body is an Array of Scalar Values

Hey team :wave:
Hope this is the right place to open Golang generation issues, today I faced a weird issue that I will try to describe below.
It seems that the generator produces a broken Golang code when trying to parse a body made by an array of scalars.
paths:
  /posts:
    post:
      description: 'Create post'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                format: int32
                type: integer
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: array
                items:
                  format: int32
                  type: integer

The generated ToPostRequestInformation is something like:
// ToPostRequestInformation create post
// returns a *RequestInformation when successful
func (m *PostsRequestBuilder) ToPostRequestInformation(ctx context.Context, body []int32, requestConfiguration *PostsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
    requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, "{+baseurl}/posts", m.BaseRequestBuilder.PathParameters)
    if requestConfiguration != nil {
        requestInfo.Headers.AddAll(requestConfiguration.Headers)
        requestInfo.AddRequestOptions(requestConfiguration.Options)
    }
    requestInfo.Headers.TryAdd("Accept", "application/json")
    requestInfo.SetContentFromScalarCollection(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body)
    return requestInfo, nil
}

The issue is that requestInfo.SetContentFromScalarCollection(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) cannot receive body (which is a []int32) as it is expecting a []interface{} type which is not allowed [1].

Maybe I missed something or I am doing something wrong (in that case, please let me know) but I think that the openapi is a valid one, therefore I am expecting a valid generated code.
Version
kiota --version                                                                                [17:54:51]
1.12.0+1735a2ff916ebec661974d9560f1dd00d3dc349b

go version                                                                                [17:55:22]
go version go1.21.8 linux/amd64

How to reproduce the issue
To reproduce the issue I took the posts quickstart from the doc and I simply modified it to have a body made by a list of scalars.

Clone my sample repo: https://github.com/lampajr/kiota_posts
Run kiota generate -l go -c PostsClient -n kiota_posts/client -d ./posts-api.yaml -o ./client

[1] https://go.dev/wiki/InterfaceSlice

Hi @lampajr
Thanks for using kiota and for reporting this.
It's probably a regression, the code to concert the slice should be generated here.
https://github.com/microsoft/kiota/blob/62c1d568fb363e04328410dbbd227b1e97a7adb7/src/Kiota.Builder/Writers/Go/CodeMethodWriter.cs#L912
And you can duplicate this unit test
https://github.com/microsoft/kiota/blob/62c1d568fb363e04328410dbbd227b1e97a7adb7/tests/Kiota.Builder.Tests/Writers/Go/CodeMethodWriterTests.cs#L1333
Is this something you'd be willing to submit a pull request for?

Hey @baywet ,
Sure, I am not that expert but I can give it a try!


Can't get it to work

Address https://github.com/indilib/indiaspberry returns 404 error.
Your instructions:
 Just copy the indidevice.py and indi_pylibcamera.py in a folder.

Is this any folder or is it a particular folder?
I get this when running whole thing:
indiserver -v ./indi_pylibcamera.py
2022-12-28T15:13:33: startup: indiserver -v ./indi_pylibcamera.py
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31924 rfd=6 wfd=6 efd=7
2022-12-28T15:13:33: listening to port 7624 on fd 5
2022-12-28T15:13:33: Local server: listening on local domain at: @/tmp/indiserver
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #0
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31925 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #1
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31926 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #2
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31927 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #3
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31928 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: process 31928 exited with status 1
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #4
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31929 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #5
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31930 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #6
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31931 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: stderr EOF
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #7
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31932 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #8
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31933 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31935 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: Terminated after #10 restarts.
2022-12-28T15:13:33: good bye

Hello,
it can be any folder.
You got this error:
Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
Likely you must make the script executable:
chmod u+x indi_pylibcamera.py
Regards,
Ronald
sajmons @.***> schrieb am Mi., 28. Dez. 2022, 16:14:

Adress https://github.com/indilib/indiaspberry returns 404 error.
Your instructions:
Just copy the indidevice.py and indi_pylibcamera.py in a folder.
Is this any folder or is it a particular folder?
I get this when running whole thing:
indiserver -v ./indi_pylibcamera.py
2022-12-28T15:13:33: startup: indiserver -v ./indi_pylibcamera.py
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31924 rfd=6 wfd=6 efd=7
2022-12-28T15:13:33: listening to port 7624 on fd 5
2022-12-28T15:13:33: Local server: listening on local domain at: @/tmp/indiserver
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #0
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31925 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #1
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31926 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #2
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31927 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #3
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31928 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: process 31928 exited with status 1
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #4
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31929 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #5
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31930 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #6
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31931 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: stderr EOF
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #7
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31932 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #8
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31933 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: restart #9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: pid=31935 rfd=7 wfd=7 efd=9
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: 2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: execlp ././indi_pylibcamera.py: Permission denied
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T15:13:33: Driver ./indi_pylibcamera.py: Terminated after #10 restarts.
2022-12-28T15:13:33: good bye
—
Reply to this email directly, view it on GitHub
https://github.com/scriptorron/indi_pylibcamera/issues/1, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFKCKCTUSXKPDMJIQ3AEYKLWPRKN7ANCNFSM6AAAAAATLK54HM
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

After making script executable I get this:
stellarmate@stellarmate:~/Projects/indi_pylibcamera $ indiserver -v ./indi_pylibcamera.py
2022-12-28T22:11:14: startup: indiserver -v ./indi_pylibcamera.py
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39241 rfd=6 wfd=6 efd=7
2022-12-28T22:11:14: listening to port 7624 on fd 5
2022-12-28T22:11:14: Local server: listening on local domain at: @/tmp/indiserver
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #0
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39242 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #1
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39243 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #2
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39244 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39244 exited with status 2
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #3
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39245 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39245 exited with status 2
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #4
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39246 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #5
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39247 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39247 exited with status 2
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #6
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39248 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #7
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39249 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #8
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39250 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39251 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: Terminated after #10 restarts.
2022-12-28T22:11:14: good bye

This is very strange. Your file "indi_pylibcamera.py" has an unexpected
newline in line 9. In the original file this line is empty. Furthermore it
is strange that this file was not executable after download. How have you
downloaded the files? You can either download as ZIP:
[image: Screenshot_20221229_112437.png]
or you can use git to make a working copy:
git clone @.***:scriptorron/indi_pylibcamera.git
Git creates a subfolder with all files. The downloaded ZIP needs to be
unpacked :-)
In both cases the indi_pylibcamera.py should already be executable. And it
should not have modifications from the original.
Am Mi., 28. Dez. 2022 um 23:14 Uhr schrieb sajmons @.***

:

After making script executable I get this:
@.***:~/Projects/indi_pylibcamera $ indiserver -v ./indi_pylibcamera.py
2022-12-28T22:11:14: startup: indiserver -v ./indi_pylibcamera.py
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39241 rfd=6 wfd=6 efd=7
2022-12-28T22:11:14: listening to port 7624 on fd 5
2022-12-28T22:11:14: Local server: listening on local domain at: @/tmp/indiserver
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #0
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39242 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #1
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39243 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #2
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39244 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39244 exited with status 2
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #3
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39245 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39245 exited with status 2
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #4
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39246 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #5
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39247 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39247 exited with status 2
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #6
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39248 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #7
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39249 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #8
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39250 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39251 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: Terminated after #10 restarts.
2022-12-28T22:11:14: good bye
—
Reply to this email directly, view it on GitHub
https://github.com/scriptorron/indi_pylibcamera/issues/1#issuecomment-1366955363,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFKCKCT63UGLAXJNTWTKNQ3WPS3SRANCNFSM6AAAAAATLK54HM
.
You are receiving this because you commented.Message ID:
@.***>

Forgot to mention:
I still did not found the time to continue on the driver. But not later
than mid January I will implement buttons to configure other raw formats
and processed frames. As soon as the sky is clear I will have autoguide
with Raspberry Pi V1 camera + PHD2 working and make pictures with HQ
camera.
Am Mi., 28. Dez. 2022 um 23:14 Uhr schrieb sajmons @.***

:

After making script executable I get this:
@.***:~/Projects/indi_pylibcamera $ indiserver -v ./indi_pylibcamera.py
2022-12-28T22:11:14: startup: indiserver -v ./indi_pylibcamera.py
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39241 rfd=6 wfd=6 efd=7
2022-12-28T22:11:14: listening to port 7624 on fd 5
2022-12-28T22:11:14: Local server: listening on local domain at: @/tmp/indiserver
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #0
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39242 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #1
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39243 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #2
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39244 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39244 exited with status 2
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #3
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39245 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39245 exited with status 2
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #4
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39246 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #5
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39247 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39247 exited with status 2
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #6
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39248 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #7
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39249 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #8
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39250 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39251 rfd=7 wfd=7 efd=9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: Terminated after #10 restarts.
2022-12-28T22:11:14: good bye
—
Reply to this email directly, view it on GitHub
https://github.com/scriptorron/indi_pylibcamera/issues/1#issuecomment-1366955363,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFKCKCT63UGLAXJNTWTKNQ3WPS3SRANCNFSM6AAAAAATLK54HM
.
You are receiving this because you commented.Message ID:
@.***>

This is very strange. Your file "indi_pylibcamera.py" has an unexpected newline in line 9. In the original file this line is empty. Furthermore it is strange that this file was not executable after download. How have you downloaded the files? You can either download as ZIP: [image: Screenshot_20221229_112437.png] or you can use git to make a working copy: git clone @.:scriptorron/indi_pylibcamera.git Git creates a subfolder with all files. The downloaded ZIP needs to be unpacked :-) In both cases the indi_pylibcamera.py should already be executable. And it should not have modifications from the original. Am Mi., 28. Dez. 2022 um 23:14 Uhr schrieb sajmons @.
…
: After making script executable I get this: @.:~/Projects/indi_pylibcamera $ indiserver -v ./indi_pylibcamera.py 2022-12-28T22:11:14: startup: indiserver -v ./indi_pylibcamera.py 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39241 rfd=6 wfd=6 efd=7 2022-12-28T22:11:14: listening to port 7624 on fd 5 2022-12-28T22:11:14: Local server: listening on local domain at: @/tmp/indiserver 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #0 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39242 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #1 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39243 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #2 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39244 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39244 exited with status 2 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #3 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39245 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39245 exited with status 2 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #4 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39246 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #5 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39247 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39247 exited with status 2 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #6 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39248 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #7 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39249 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #8 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39250 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39251 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: Terminated after #10 restarts. 2022-12-28T22:11:14: good bye — Reply to this email directly, view it on GitHub <#1 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFKCKCT63UGLAXJNTWTKNQ3WPS3SRANCNFSM6AAAAAATLK54HM . You are receiving this because you commented.Message ID: @.>

My bad. Sorry! I downloaded file with save as option (yeah I know... no comment). After making proper git clone it works!

Forgot to mention: I still did not found the time to continue on the driver. But not later than mid January I will implement buttons to configure other raw formats and processed frames. As soon as the sky is clear I will have autoguide with Raspberry Pi V1 camera + PHD2 working and make pictures with HQ camera. Am Mi., 28. Dez. 2022 um 23:14 Uhr schrieb sajmons @.***
…
: After making script executable I get this: @.:~/Projects/indi_pylibcamera $ indiserver -v ./indi_pylibcamera.py 2022-12-28T22:11:14: startup: indiserver -v ./indi_pylibcamera.py 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39241 rfd=6 wfd=6 efd=7 2022-12-28T22:11:14: listening to port 7624 on fd 5 2022-12-28T22:11:14: Local server: listening on local domain at: @/tmp/indiserver 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #0 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39242 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #1 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39243 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #2 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39244 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39244 exited with status 2 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #3 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39245 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39245 exited with status 2 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #4 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39246 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #5 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39247 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39247 exited with status 2 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #6 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39248 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #7 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39249 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #8 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39250 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39251 rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: Terminated after #10 restarts. 2022-12-28T22:11:14: good bye — Reply to this email directly, view it on GitHub <#1 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFKCKCT63UGLAXJNTWTKNQ3WPS3SRANCNFSM6AAAAAATLK54HM . You are receiving this because you commented.Message ID: @.>

Wow, that's amazing. I'm trying to achieve something simmilar with my HQ camera. You can guide with Raspberry Pi V1 camera!? That's amazing, you do OAG guiding? Would be great to get your driver displayed in Ekos UI. How you comunicate with your driver? Using indi_setprop? Do you have any examples for that?

Hi,
last Autumn I made some experiments with Astroberry (on a Raspberry 4), V1
camera (connected to the same Raspberry) and PHD2. I looked with the camera
through the ocular of my telescopes finderscope. It was not easy to mound
it stable to the finderscope (see attached pictures). I also needed to buy
tele-lenses for the camera on ebay because my telescope has 2000mm focal
length and I wanted at least 200mm focal length for the finderscope+camera
construction (25mm telelenses together with 8x finderscope). After all I
got PHD2 to guide my telescope in a sufficient and stable way. But there
are still 2 issues to solve:

I used the indi_rpicam driver. This one is so buggy! Setting exposure
time is a lottery. I also have doubts that this driver reads raw images.
For instance it makes a difference if you disabled the defect pixel
correction algorithm (DPC) of the camera. This algorithm runs in the image
signal processor and does not influence raw frames. Likely what I got were
processed frames. I believe with raw frames the guiding will work much
better.
My finderscope+camera construction is not easy to focus. There are 3
degrees of freedom: the finderscope focus, the distance between finderscope
ocular and camera lens, the distance between camera lens and imager chip. I
could focus on a star for guiding. But that focused area was only in the
center of the image (or a ring around the center of the image). It seems
that I still not found a flat image plane. I need to do spend more time in
optimizing this. Or I need to spend money for a separate guiding scope.

I think a V1 camera is good enough for guiding. It does not allow more than
6s exposure time but for guiding you will anyway not use long exposure
times. Compared to the HQ camera the V1 has lower sensitivity, more noise
and suffers from amplifier glow. But for guiding on bright stars it is
likely good enough.
Definitely needed is a better INDI driver for the camera. My plan is to
have a HQ camera connected to a Raspberry Pi Zero for doing long exposures
through the main scope. This Pi is configured as "USB Gadget"
https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/ethernet-gadget.
The USB connection between the Pi Zero and the Pi 4 supplies the HQ camera
with power and makes a LAN connection between the two Pi's. The Pi 4 runs
KStars, EKOS and PHD2. It also controls the mount. The V1 camera for
guiding is connected to the Pi 4 to safe the time for image transmission.
With remote desktop (xrdp) I will log in the Pi4 from a laptop to operate
everything.
You asked how I communicate with the driver. For development I start
"indiserver -v indi_pylibcamera" on the Pi Zero and connect to that with
EKOS (KStars) running on a laptop. Later EKOS will run on the Pi 4. EKOS
detects the driver (see attached screen shots, sorry - German) and I can
take photos with EKOS. But there is still a lot more to implement and
improve on the driver.
Best Regards and Happy New Year,
Ronald
Am Do., 29. Dez. 2022 um 15:19 Uhr schrieb sajmons @.***

:

Forgot to mention: I still did not found the time to continue on the
driver. But not later than mid January I will implement buttons to
configure other raw formats and processed frames. As soon as the sky is
clear I will have autoguide with Raspberry Pi V1 camera + PHD2 working and
make pictures with HQ camera. Am Mi., 28. Dez. 2022 um 23:14 Uhr schrieb
sajmons @.***
… <#m_-8766727338145492537_>
: After making script executable I get this: @.:~/Projects/indi_pylibcamera
$ indiserver -v ./indi_pylibcamera.py 2022-12-28T22:11:14: startup:
indiserver -v ./indi_pylibcamera.py 2022-12-28T22:11:14: Driver
./indi_pylibcamera.py: pid=39241 rfd=6 wfd=6 efd=7 2022-12-28T22:11:14:
listening to port 7624 on fd 5 2022-12-28T22:11:14: Local server: listening
on local domain at: @/tmp/indiserver 2022-12-28T22:11:14: Driver
./indi_pylibcamera.py: ././indi_pylibcamera.py: 9: Syntax error: newline
unexpected 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read:
Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py:
restart #0 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39242
rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py:
././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset
by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #1
https://github.com/scriptorron/indi_pylibcamera/issues/1
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39243 rfd=7 wfd=7
efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py:
././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset
by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #2
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39244 rfd=7 wfd=7
efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py:
././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39244 exited
with status 2 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read:
Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py:
restart #3 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39245
rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py:
././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39245 exited
with status 2 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read:
Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py:
restart #4 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39246
rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py:
././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset
by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #5
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39247 rfd=7 wfd=7
efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py:
././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: stderr EOF
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: process 39247 exited
with status 2 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read:
Connection reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py:
restart #6 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39248
rfd=7 wfd=7 efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py:
././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset
by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #7
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39249 rfd=7 wfd=7
efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py:
././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset
by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #8
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39250 rfd=7 wfd=7
efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py:
././indi_pylibcamera.py: 9: Syntax error: newline unexpected
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection reset
by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: restart #9
2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: pid=39251 rfd=7 wfd=7
efd=9 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: read: Connection
reset by peer 2022-12-28T22:11:14: Driver ./indi_pylibcamera.py: Terminated
after #10 restarts. 2022-12-28T22:11:14: good bye — Reply to this email
directly, view it on GitHub <#1 (comment)
https://github.com/scriptorron/indi_pylibcamera/issues/1#issuecomment-1366955363>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFKCKCT63UGLAXJNTWTKNQ3WPS3SRANCNFSM6AAAAAATLK54HM
https://github.com/notifications/unsubscribe-auth/AFKCKCT63UGLAXJNTWTKNQ3WPS3SRANCNFSM6AAAAAATLK54HM
. You are receiving this because you commented.Message ID: @.>
Wow, that's amazing. I'm trying to achieve something simmilar with my HQ
camera. You can guide with Raspberry Pi V1 camera!? That's amazing, you do
OAG guiding? Would be great to get your driver displayed in Ekos UI. How
you comunicate with your driver? Using indi_setprop? Do you have any
examples for that?
—
Reply to this email directly, view it on GitHub
https://github.com/scriptorron/indi_pylibcamera/issues/1#issuecomment-1367361284,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFKCKCWAA3GNVPRML3YJRQDWPWMXJANCNFSM6AAAAAATLK54HM
.
You are receiving this because you commented.Message ID:
@.***>

Thnx for your help Ronald.
Now I can successfully run the driver, but when trying to connect to it with Kstars/Ekos I get this:
stellarmate@stellarmate:~/Projects/indi_pylibcamera $ indiserver -v ./indi_pylibcamera.py
2023-01-02T17:11:51: startup: indiserver -v ./indi_pylibcamera.py
2023-01-02T17:11:51: Driver ./indi_pylibcamera.py: pid=64287 rfd=6 wfd=6 efd=7
2023-01-02T17:11:51: listening to port 7624 on fd 5
2023-01-02T17:11:51: Local server: listening on local domain at: @/tmp/indiserver
2023-01-02T17:11:52: Driver ./indi_pylibcamera.py: [273:58:50.050524784] [64287]  INFO Camera camera_manager.cpp:299 libcamera v0.0.1
2023-01-02T17:11:52: Driver ./indi_pylibcamera.py: [273:58:50.127853466] [64288]  INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media3 and ISP device /dev/media0
2023-01-02T17:11:52: Driver ./indi_pylibcamera.py: root-INFO- found cameras: [{'Model': 'imx477', 'Location': 2, 'Rotation': 180, 'Id': '/base/soc/i2c0mux/i2c@1/imx477@1a'}]
2023-01-02T17:11:52: Driver ./indi_pylibcamera.py: root-INFO- Parsed data from client
2023-01-02T17:11:52: Driver ./indi_pylibcamera.py: root-INFO- <getProperties version="1.7"/>
2023-01-02T17:11:52: Driver ./indi_pylibcamera.py:
2023-01-02T17:11:52: Driver ./indi_pylibcamera.py: root-INFO- End client data
2023-01-02T17:11:52: Driver ./indi_pylibcamera.py: root-INFO- send_defVector: <defSwitchVector device="indi_pylibcamera" rule="OneOfMany" perm="rw" state="Idle" group="Main Control" label="Camera" name="CAMERA_SELECTION"><defSwitch name="CAM0" label="/base/soc/i2c0mux/i2c@1/imx477@1a">On</defSwitch></defSwitchVector>
2023-01-02T17:11:52: Driver ./indi_pylibcamera.py: root-INFO- send_defVector: <defSwitchVector device="indi_pylibcamera" rule="OneOfMany" perm="rw" state="Idle" group="Main Control" label="Connection" name="CONNECTION"><defSwitch name="CONNECT" label="Connect">Off</defSwitch><defSwitch name="DISCONNECT" label="Disonnect">On</defSwitch></defSwitchVector>
2023-01-02T17:11:52: Driver ./indi_pylibcamera.py: root-INFO- send_defVector: <defTextVector device="indi_pylibcamera" perm="ro" state="Idle" group="General Info" label="Driver Info" name="DRIVER_INFO"><defText name="DRIVER_NAME" label="Name">indi_pylibcamera</defText><defText name="DRIVER_EXEC" label="Exec">././indi_pylibcamera.py</defText><defText name="DRIVER_VERSION" label="Version">1.0.0</defText><defText name="DRIVER_INTERFACE" label="Interface">2</defText></defTextVector>
2023-01-02T17:11:52: Driver ./indi_pylibcamera.py: root-INFO- send_defVector: <defSwitchVector device="indi_pylibcamera" rule="OneOfMany" perm="rw" state="Idle" group="Options" label="Logging" name="LOGGING_LEVEL"><defSwitch name="LOGGING_DEBUG" label="Debug">Off</defSwitch><defSwitch name="LOGGING_INFO" label="Info">On</defSwitch><defSwitch name="LOGGING_WARN" label="Warning">Off</defSwitch><defSwitch name="LOGGING_ERROR" label="Error">Off</defSwitch></defSwitchVector>
2023-01-02T17:12:24: Client 9: new arrival from <IP_ADDRESS>:37854 - welcome!
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: root-INFO- Parsed data from client
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: root-INFO- <getProperties version="1.7"/>
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: root-INFO- End client data
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: root-INFO- send_defVector: <defSwitchVector device="indi_pylibcamera" rule="OneOfMany" perm="rw" state="Idle" group="Main Control" label="Camera" name="CAMERA_SELECTION"><defSwitch name="CAM0" label="/base/soc/i2c0mux/i2c@1/imx477@1a">On</defSwitch></defSwitchVector>
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: root-INFO- send_defVector: <defSwitchVector device="indi_pylibcamera" rule="OneOfMany" perm="rw" state="Idle" group="Main Control" label="Connection" name="CONNECTION"><defSwitch name="CONNECT" label="Connect">Off</defSwitch><defSwitch name="DISCONNECT" label="Disonnect">On</defSwitch></defSwitchVector>
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: root-INFO- send_defVector: <defTextVector device="indi_pylibcamera" perm="ro" state="Idle" group="General Info" label="Driver Info" name="DRIVER_INFO"><defText name="DRIVER_NAME" label="Name">indi_pylibcamera</defText><defText name="DRIVER_EXEC" label="Exec">././indi_pylibcamera.py</defText><defText name="DRIVER_VERSION" label="Version">1.0.0</defText><defText name="DRIVER_INTERFACE" label="Interface">2</defText></defTextVector>
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: root-INFO- send_defVector: <defSwitchVector device="indi_pylibcamera" rule="OneOfMany" perm="rw" state="Idle" group="Options" label="Logging" name="LOGGING_LEVEL"><defSwitch name="LOGGING_DEBUG" label="Debug">Off</defSwitch><defSwitch name="LOGGING_INFO" label="Info">On</defSwitch><defSwitch name="LOGGING_WARN" label="Warning">Off</defSwitch><defSwitch name="LOGGING_ERROR" label="Error">Off</defSwitch></defSwitchVector>
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: root-INFO- Parsed data from client
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: root-INFO- <newSwitchVector device="indi_pylibcamera" name="CONNECTION">
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:     <oneSwitch name="CONNECT">
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: On
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:     </oneSwitch>
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: </newSwitchVector>
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: root-INFO- End client data
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: root-INFO- send_setVector: <setSwitchVector device="indi_pylibcamera" name="CONNECTION" state="Busy" timeout="60"><oneSwitch na
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: root-INFO- connecting to camera /base/soc/i2c0mux/i2c@1/imx477@1a
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: [273:59:22.136822967] [64287]  INFO Camera camera_manager.cpp:299 libcamera v0.0.1
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: [273:59:22.278134109] [64296]  INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media3 and ISP device /dev/media0
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: picamera2.picamera2-ERROR- Camera __init__ sequence did not complete.
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: Traceback (most recent call last):
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:   File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 237, in __init__
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:     self._open_camera()
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:   File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 447, in _open_camera
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:     if not self._initialize_camera():
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:   File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 431, in _initialize_camera
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:     self.sensor_format = str(self.camera.generate_configuration([RAW]).at(0).pixel_format)
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: RuntimeError: Non-owning holder (loaded_as_shared_ptr).
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: During handling of the above exception, another exception occurred:
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: Traceback (most recent call last):
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:   File "/home/stellarmate/Projects/indi_pylibcamera/././indi_pylibcamera.py", line 818, in <module>
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:     loop.run_until_complete(device.run())
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:   File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:     return future.result()
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:   File "/home/stellarmate/Projects/indi_pylibcamera/indidevice.py", line 593, in run
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:     await asyncio.gather(
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:   File "/home/stellarmate/Projects/indi_pylibcamera/indidevice.py", line 579, in message_loop
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:     vector.set_byClient(values)
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:   File "/home/stellarmate/Projects/indi_pylibcamera/././indi_pylibcamera.py", line 114, in set_byClient
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:     if self.parent.open_Camera():
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:   File "/home/stellarmate/Projects/indi_pylibcamera/././indi_pylibcamera.py", line 325, in open_Camera
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:     self.picam2 = Picamera2(CameraIdx)
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:   File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 244, in __init__
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py:     raise RuntimeError("Camera __init__ sequence did not complete.")
2023-01-02T17:12:24: Driver ./indi_pylibcamera.py: RuntimeError: Camera __init__ sequence did not complete.
2023-01-02T17:12:25: Driver ./indi_pylibcamera.py: read EOF
<delProperty device="indi_pylibcamera"/>
2023-01-02T17:12:25: Driver ./indi_pylibcamera.py: restart #0
2023-01-02T17:12:25: Driver ./indi_pylibcamera.py: pid=64301 rfd=7 wfd=7 efd=10
2023-01-02T17:12:25: Client 9: read EOF
2023-01-02T17:12:25: Client 9: shut down complete - bye!
2023-01-02T17:12:26: Driver ./indi_pylibcamera.py: [273:59:23.911945579] [64301]  INFO Camera camera_manager.cpp:299 libcamera v0.0.1
2023-01-02T17:12:26: Driver ./indi_pylibcamera.py: [273:59:24.029898120] [64302]  INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media3 and ISP device /dev/media0
2023-01-02T17:12:26: Driver ./indi_pylibcamera.py: root-INFO- found cameras: [{'Model': 'imx477', 'Location': 2, 'Rotation': 180, 'Id': '/base/soc/i2c0mux/i2c@1/imx477@1a'}]
2023-01-02T17:12:26: Driver ./indi_pylibcamera.py: root-INFO- Parsed data from client
2023-01-02T17:12:26: Driver ./indi_pylibcamera.py: root-INFO- <getProperties version="1.7"/>
2023-01-02T17:12:26: Driver ./indi_pylibcamera.py:
2023-01-02T17:12:26: Driver ./indi_pylibcamera.py: root-INFO- End client data
2023-01-02T17:12:26: Driver ./indi_pylibcamera.py: root-INFO- send_defVector: <defSwitchVector device="indi_pylibcamera" rule="OneOfMany" perm="rw" state="Idle" group="Main Control" label="Camera" name="CAMERA_SELECTION"><defSwitch name="CAM0" label="/base/soc/i2c0mux/i2c@1/imx477@1a">On</defSwitch></defSwitchVector>
2023-01-02T17:12:26: Driver ./indi_pylibcamera.py: root-INFO- send_defVector: <defSwitchVector device="indi_pylibcamera" rule="OneOfMany" perm="rw" state="Idle" group="Main Control" label="Connection" name="CONNECTION"><defSwitch name="CONNECT" label="Connect">Off</defSwitch><defSwitch name="DISCONNECT" label="Disonnect">On</defSwitch></defSwitchVector>
2023-01-02T17:12:26: Driver ./indi_pylibcamera.py: root-INFO- send_defVector: <defTextVector device="indi_pylibcamera" perm="ro" state="Idle" group="General Info" label="Driver Info" name="DRIVER_INFO"><defText name="DRIVER_NAME" label="Name">indi_pylibcamera</defText><defText name="DRIVER_EXEC" label="Exec">././indi_pylibcamera.py</defText><defText name="DRIVER_VERSION" label="Version">1.0.0</defText><defText name="DRIVER_INTERFACE" label="Interface">2</defText></defTextVector>
2023-01-02T17:12:26: Driver ./indi_pylibcamera.py: root-INFO- send_defVector: <defSwitchVector device="indi_pylibcamera" rule="OneOfMany" perm="rw" state="Idle" group="Options" label="Logging" name="LOGGING_LEVEL"><defSwitch name="LOGGING_DEBUG" label="Debug">Off</defSwitch><defSwitch name="LOGGING_INFO" label="Info">On</defSwitch><defSwitch name="LOGGING_WARN" label="Warning">Off</defSwitch><defSwitch name="LOGGING_ERROR" label="Error">Off</defSwitch></defSwitchVector>

Your camera was recognized:
root-INFO- found cameras: [{'Model': 'imx477', 'Location': 2, 'Rotation': 180, 'Id': '/base/soc/i2c0mux/i2c@1/imx477@1a'}]
But errors occurred when opening the camera:
RuntimeError: Non-owning holder (loaded_as_shared_ptr).
RuntimeError: Camera __init__ sequence did not complete.
Was the camera already opened and in use by an other program?
Does the camera work with the libcamera apps? Do you get errors when you run:
libcamera-hello --list-cameras
libcamera-still -r -o test.jpg
If all this does not give a hint we need to find out the differences in our installation. Please forward me the outputs of:
cat /etc/os-release
uname -a
apt list --installed | grep libcamera
apt-list --installed | grep picamera`

I tryed again and reboted device. Same error happened again. So now I'm sure camera was not used by other device.
libcamera-hello --list-cameras
Available cameras
-----------------
0 : imx477 [4056x3040] (/base/soc/i2c0mux/i2c@1/imx477@1a)
    Modes: 'SRGGB10_CSI2P' : 1332x990 [120.05 fps - (696, 528)/2664x1980 crop]
           'SRGGB12_CSI2P' : 2028x1080 [50.03 fps - (0, 440)/4056x2160 crop]
                             2028x1520 [40.01 fps - (0, 0)/4056x3040 crop]
                             4056x3040 [10.00 fps - (0, 0)/4056x3040 crop]

libcamera-still -r -o test.jpg
Made X/EGL preview window
[0:06:15.342289179] [2106]  INFO Camera camera_manager.cpp:299 libcamera v0.0.1
[0:06:15.436879300] [2108]  INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media3 and ISP device /dev/media0
[0:06:15.439898121] [2106]  INFO Camera camera.cpp:1026 configuring streams: (0) 2028x1520-YUV420
[0:06:15.442013971] [2108]  INFO RPI raspberrypi.cpp:766 Sensor: /base/soc/i2c0mux/i2c@1/imx477@1a - Selected sensor format: 2028x1520-SBGGR12_1X12 - Selected unicam format: 2028x1520-pBCC
[0:06:21.110365388] [2106]  INFO Camera camera.cpp:1026 configuring streams: (0) 4056x3040-YUV420 (1) 4056x3040-SBGGR12_CSI2P
[0:06:21.112770963] [2108]  INFO RPI raspberrypi.cpp:766 Sensor: /base/soc/i2c0mux/i2c@1/imx477@1a - Selected sensor format: 4056x3040-SBGGR12_1X12 - Selected unicam format: 4056x3040-pBCC
Still capture image received
Bayer format is BGGR-12

Both these commands gave expected result. My camera is connected to board with ribbon cable, not usb. Maybe this is waht is causing error?

Sorry, I meant apt list --installed | grep picamera

apt list --installed | grep picamera

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

python3-picamera2/stable,stable,now 0.3.7-1 all [installed]

There are some differences in our setups:

We both have the same version of picamera2.
Our versions of the libcamera packages differ. For instance your libcamera0 version is "1.0-stable~202211161314" while my version is "0~git20221130+0684c373-1". It seems Raspbian uses development versions while you use stable releases which are older (November 16th vs November 30th).
Your OS is a Debian based Stellarmate while I use Raspbian. Both are Bullseye. But I have the 32bit OS while you use the 64bit one.

Do you get updates when you run sudo apt install libcamera0 python3-libcamera?
In worst case you found a libcamera or picamera2 bug which is only visible in 64bit OS. All tests I did so far were with 32bit Raspbian. If it is really a libcamera/picamera2 bug we can only report this to the picamera2 developers hoping to get a solution.

Here is output of latest command:
sudo apt install libcamera0 python3-libcamera
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libcamera0 is already the newest version (1.0-stable~202211161314).
libcamera0 set to manually installed.
python3-libcamera is already the newest version (1.0-stable~202211161314).
python3-libcamera set to manually installed.
The following packages were automatically installed and are no longer required:
  linux-headers-5.10.0-19-arm64 linux-headers-5.10.0-19-common
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Nothing get's updated.

Okay. I will setup a 64bit Raspbian and try if I can reproduce the error. Please give me 2 days.

You are really great! If you can provide me with information what IDE are you using for Python development, maybe I can try to debug it myself.

Maybe you can see this project https://github.com/Gordon999/Pi_LIbCamera_GUI. It works on my system.

Thank you for showing me this project. I will have a look on it.
I set up a Raspberry Pi 4 with 64bit Raspbian. The library versions are the same as on my 32bit Pi Zero. Unfortunately I could not reproduce the error there. In the meantime I believe you will need a library update :-(
For Python coding I use PyCharm (https://www.jetbrains.com) on laptop and copy the modified files with rsync to the Raspberry Pi. In fact I do not know how to do remote debugging. I always use print statements for debugging.
To isolate the root cause I made a short and simple test case. It just detects connected cameras and opens the first one. On my systems it runs fine. On your system the line picam2 = Picamera2(0) will likely throw an error.
Please copy the text below in a file "test.sh". Take care for the different indenting. Make it executable (chmod u+x test.sh) and run it. I expect you will get an error trace.
#!/usr/bin/env python3

from picamera2 import Picamera2

# get list of available cameras:
cameras = Picamera2.global_camera_info()

if len(cameras) > 0:
    print(f'Opening camera 0: {cameras[0]}')
    picam2 = Picamera2(0)
    print('Success.')
else:
    print('WARNING: No camera found!')

print('Finished.')

The output os test.sh is:
stellarmate@stellarmate:~/Projects/indi_pylibcamera $ ./test.sh
[6:08:15.761089706] [8647]  INFO Camera camera_manager.cpp:299 libcamera v0.0.1
[6:08:15.822850428] [8648]  INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media1 and ISP device /dev/media2
Opening camera 0: {'Model': 'imx477', 'Location': 2, 'Rotation': 180, 'Id': '/base/soc/i2c0mux/i2c@1/imx477@1a'}
[6:08:15.825476481] [8647]  INFO Camera camera_manager.cpp:299 libcamera v0.0.1
[6:08:15.890340713] [8652]  INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media1 and ISP device /dev/media2
Camera __init__ sequence did not complete.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 237, in __init__
    self._open_camera()
  File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 447, in _open_camera
    if not self._initialize_camera():
  File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 431, in _initialize_camera
    self.sensor_format = str(self.camera.generate_configuration([RAW]).at(0).pixel_format)
RuntimeError: Non-owning holder (loaded_as_shared_ptr).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/stellarmate/Projects/indi_pylibcamera/./test.sh", line 10, in <module>
    picam2 = Picamera2(0)
  File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 244, in __init__
    raise RuntimeError("Camera __init__ sequence did not complete.")
RuntimeError: Camera __init__ sequence did not complete.

There is another INDI python driver project you might be interested in:
https://github.com/aaronwmorris/indi-allsky

Thanks.
The error is what I expected. The line 431 in picamera2.py makes the trouble:
self.sensor_format = str(self.camera.generate_configuration([RAW]).at(0).pixel_format)

In this line the method generate_configuration of the object self.camera is called. This object comes from libcamera library. For any reasons it raises the error RuntimeError: Non-owning holder (loaded_as_shared_ptr). This is nothing I can fix or work around. Sorry. We can only hope that it is fixed in the next update.

I'm glad that you were able to pinpoint the source of a problem. Did you opened the issue on picamera2 github?
I also wish to thank you for your outstanding support and all the work you invested in this driver. I'll try to set up 32 bit system and test it with that.

You are welcome. I am happy that someone will try my driver.
I can open an issue on picamera2. But when it comes to the point of testing bug fixes I will need your help. Too bad that I could not reproduce the error.

That's no problem, you can count on me for testing.

Hmm, that's interesting. I did a fresh instalation of Stellarmate 32bit and when I tryed to install required libraries I get this:
I guess Stellarmate repository is missing python3-picamera2?
stellarmate@stellarmate:~ $ sudo apt-get install python3 python3-lxml python3-astropy python3-picamera2
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3-picamera2

Unfortunatelly Stellarmate only comes in 64bit Bullseye version
I have tried it on fresh instalation (nothing changer only prerequisites for your driver installed) and after running test.sh result is the same:
stellarmate@stellarmate:~/Projects/indi_pylibcamera $ ./test.sh
[1:01:18.484283460] [10540]  INFO Camera camera_manager.cpp:299 libcamera v0.0.1
[1:01:18.550090496] [10541]  INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media4 and ISP device /dev/media1
Opening camera 0: {'Model': 'imx477', 'Location': 2, 'Rotation': 180, 'Id': '/base/soc/i2c0mux/i2c@1/imx477@1a'}
[1:01:18.553176786] [10540]  INFO Camera camera_manager.cpp:299 libcamera v0.0.1
[1:01:18.623775182] [10545]  INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media4 and ISP device /dev/media1
Camera __init__ sequence did not complete.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 237, in __init__
    self._open_camera()
  File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 447, in _open_camera
    if not self._initialize_camera():
  File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 431, in _initialize_camera
    self.sensor_format = str(self.camera.generate_configuration([RAW]).at(0).pixel_format)
RuntimeError: Non-owning holder (loaded_as_shared_ptr).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/stellarmate/Projects/indi_pylibcamera/./test.sh", line 10, in <module>
    picam2 = Picamera2(0)
  File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 244, in __init__
    raise RuntimeError("Camera __init__ sequence did not complete.")
RuntimeError: Camera __init__ sequence did not complete.

Maybe now is time to open new issue.

I will open an issue on picamera2. Likely they will say it is fixed in the newer version. Than we can open an issue in Stellarmate and ask them to update their libraries.

I opened issue https://github.com/raspberrypi/picamera2/issues/502

Has Stelarmate updated the libcamera packages and does it work now? Can we close this issue?

I have tested it again today, but still no luck. I will close this issue, because it's not related to your driver, and there is nothing you can do here.